/* * Copyright Â© 2016-FOREVER, Draven * All rights reserved by Draven. * * This source code is licensed only for use by Draven. * * ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;tGf;;;;;;;;;;;;;;;;;;;;; * ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;tL008f;;;;;;;;;;;;;;;;;;;;; * ;;;;;;;;;;;;;;;;;;;;;;;;;;;1LG000G8f;;;;;;;;;;;;;;;;;;;;; * ;;;;;;;;;;;;;;;;;;;;;;;;1LG00000008f;;;;;;;;i;;;;;;;;;;;; * ;;;;;;;;;;;;;;;;;;;;;1LG00000000008f;;;;;ifC81;;;;;;;;;;; * ;;;;;;;;;;;;;;;;;;1fG00000000000008f;;itC00001;;;;;;;;;;; * ;;;;;;;;;;;;;;;ifC00000000000000008LtC00000001;ii;;;;;;;; * ;;;;;;;;;;;;ifC000000000000000000000000000008i;01;;;;;;;; * ;;;;;;;;;;;t0000000000000000000GGGGG0000000001C81;;;;;;;; * ;;;;;;;;1;;t0G000000000000000GGGG0000000000000G01;;;;;;;; * ;;;;;;;;8GfL0G0000000000000GGGG00000000000000GG81;;;;;;;; * ;;;;;;;;0G00GG0000000000000GG000000000000000G0081;;;;;;;; * ;;;;;;;;0GG0GG0000000000000G000000000000000000081;;;;;;;; * ;;;;;;;;0G00GG00000000000000GG0000000000000000081;;;;;;;; * ;;;;;;;;000800000000000008GfttLG00000000000000081;;;;;;;; * ;;;;;;iLCCCGCCCGGGGCCCCCGfttttttLGCCCCCCCCCCCCCGftt;;;;;; * ;;;;;;1Gttttttttttttttttttffttffttttttt1111tttttffL;;;;;; * ;;;;;;1CtffffffLGGLffffffffffffffffffttfCCftfttfftL;;;;;; * ;;;;;;1CtffttLG0000GLftfffffffffffttfLG0000Cf1tfftL;;;;;; * ;;;;;;1G1ttfC00800000GLt1tt1tt1ttttC000000800CftttL;;;;;; * ;;;;;;;LLLG088GLG8000000CLLCfLCLLG0000080CLG880CLCt;;;;;; * ;;;;;;;f0080Ct;;;1L08000000Gi100000008Gfi;;;fG88001;;;;;; * ;;;1ttL000C1;;;;;;;;tC0000011it00080L1;;;;;;;;tC000Lt1;;; * ;1ft11tGGL;;;;;;;;;1;;iL0Gfi11iL00f;;;1;;;;;;;;;CGC11tf1; * tLii1tffLLii;;;;;;ifi;1Cf1i1111i1LCi;1f;;;;;;;iiCLLf1iiLt * Ci1tfLfiLG1iiiiiiiiiifGf111111111tLG1;;iiiiiiii10t1fLt1iC * Ci1tGtfttG0CCCCCCCCCCCt111111111111fCCCCCCCCCCC0C11ifCiiC * Lti1fCi1t1fG00000000Lii111111111111i1C00000000Cti1i1C1itL * ;ffi1Lftftii11111111111ii11111111ii1111111111iiii1iLttfL; * ;;1CLCGttLLLLLLLLLLLLCCLt1ii11ii1fCCLLLLLLLLLLLLfit0CCGC; * ;;;CCfCLf8GCCCCCCCGGGGGGGCf111tfCGGGGGGGCCCCCCC00tGfCCC1; * ;;;itffGC0GGGCCftt1ii1i;;i111111i;;i1ii1ttfCCG0G0CCtft;;; * ;;;;;;;LC00@@@@@@@8GCLf;;;;;;;;;;;;fLCG8@@@@@@800Lf;;;;;; * ;;;;;;;LC0GffCG8880CLLfi;;;;ii;;;;iffLCG080GLffG0Lf;;;;;; * ;;;;;;;LC0G1iii1tttttft1ii;;ii;;ii1ftttt111iiitG0Lf;;;;;; * ;;;;;;;LC0G11111ii1111tfffffLLfffftt1111111111tG0Lf;;;;;; * ;;;;;;;LL0G111111111111iiiiiiiiiiii1111111111itG0Lf;;;;;; * ;;;;;;;LC0G111111111111ttt111111ttt1111111111itG0Lf;;;;;; * ;;;;;;;iC0G1i111111fft1111tttttt111ttft111111itG0f;;;;;;; * ;;;;;;;;f8Gf1i11111fffffti1111111ffffft1111ii1LG0i;;;;;;; * ;;;;;;;;f8Cift1i111ffffff11111111ffffft111i1ftiG01;;;;;;; * ;;;;;;;;f8C;;1ft1i1ffffftiiiiiii1ffffftii1fti;;G01;;;;;;; * ;;;;;;;;f8C;;;;1ft1ffffft1111111tffffft1tfi;;;iG01;;;;;;; * ;;;;;;;;f8C;;;;;;i1111111111111111111111i;;;;;;G0i;;;;;;; * ;;;;;;;;f8L;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;G0i;;;;;;; * ;;;;;;;;f8L;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;G0i;;;;;;; * ;;;;;;;;f8L;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;G0i;;;;;;; * ;;;;;;;;f8L;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;G0i;;;;;;; * ;;;;;;;;f8L;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;G0i;;;;;;; * ;;;;;;;;f8C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;G0i;;;;;;; * ;;;;;;;;f8C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;G0i;;;;;;; * ;;;;;;;;t8L;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;G0i;;;;;;; * ;;;;;;;;i0t;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;LG;;;;;;;; */ (function(){var e,t,i,n,s,a;for(n=window,n.$=jQuery.noConflict(),e=$("html"),a=[{name:"Android",regex:/Android/i,"class":"android"},{name:"Chrome",regex:/Chrome/i,"class":"chrome"},{name:"iOS",regex:/iPhone|iPad|iPod/i,"class":"ios"},{name:"iPad",regex:/iPad/i,"class":"ipad"},{name:"iPhone",regex:/iPhone|iPod/i,"class":"iphone"},{name:"Mobile",regex:/Android|IEMobile|iPhone|iPod/i,"class":"mobile"},{name:"Webkit",regex:/Webkit/i,"class":"webkit"},{name:"Firefox",regex:/Firefox/i,"class":"ff"},{name:"IE",regex:/(MSIE|Trident)/i,"class":"ie"},{name:"IE10",regex:/MSIE 10/i,"class":"ie-10"},{name:"IEnot8",regex:/MSIE [^8]/i,"class":"ie-not-8"},{name:"IE8",regex:/MSIE 8/i,"class":"ie-8"},{name:"IE9",regex:/MSIE 9/i,"class":"ie-9"},{name:"Windows",regex:/Windows/i,"class":"windows"}],n.isBrowser={},t=0,i=a.length;i>t;t++)s=a[t],n.isBrowser[s.name]=function(){return navigator.userAgent.match(s.regex)}();n.$document=$(document),$document.ready(function(){var t,i,r;for(r=[],t=0,i=a.length;i>t;t++)s=a[t],e.addClass(n.isBrowser[s.name]?s["class"]:"not-"+s["class"]),n.isBrowser[s.name]&&$(".not-for-"+s["class"]).remove(),n.isBrowser[s.name]?r.push(void 0):r.push($(".for-"+s["class"]).remove());return r})}).call(this),function(){var e,t=function(e,t){return function(){return e.apply(t,arguments)}},i=function(e,t){function i(){this.constructor=e}for(var s in t)n.call(t,s)&&(e[s]=t[s]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},n={}.hasOwnProperty;this.TabContainer=function(){function t(t){var i;this.$container=t,i=$(this.$container.data("tab-selector")),this.tabs=[],i.each(function(t){return function(i,n){var s;return s=new e($(n),t),t.tabs.push(s)}}(this))}return t.prototype.activate=function(e){var t,i,n,s,a;for(null==e&&(e=null),null==e&&(e=this.tabs[0]),a=null,n=this.tabs,t=0,i=n.length;i>t;t++)s=n[t],s===e?a=s:s.deactivate();return a?a.activate():void 0},t.prototype.deactivate=function(){var e,t,i,n,s;for(i=this.tabs,n=[],e=0,t=i.length;t>e;e++)s=i[e],n.push(s.deactivate());return n},t}(),e=function(){function e(e,i){var n;this.$button=e,this.parent=i,this.onDeactivate=t(this.onDeactivate,this),this.onActivate=t(this.onActivate,this),this.active=!1,n=this.$button.data("target"),this.$target=$(n),this.$button.on("click",function(e){return function(){return e.parent.activate(e)}}(this)),this.activateCallbacks=[],this.deactivateCallbacks=[]}return e.prototype.onActivate=function(e){return this.activateCallbacks.push(e)},e.prototype.onDeactivate=function(e){return this.deactivateCallbacks.push(e)},e.prototype.activate=function(){var e,t,i,n;if(!this.active){for(this.active=!0,this.$button.addClass("active"),this.$target.addClass("active"),n=this.activateCallbacks,t=0,i=n.length;i>t;t++)e=n[t],"function"==typeof e&&e();return!0}},e.prototype.deactivate=function(){var e,t,i,n;if(this.active){for(this.active=!1,this.$button.removeClass("active"),this.$target.removeClass("active"),n=this.deactivateCallbacks,t=0,i=n.length;i>t;t++)e=n[t],"function"==typeof e&&e();return!0}},e}(),this.HeroContainer=function(e){function n(e){var i,s,a,r,o,h,c,d,l,u,p,m,f,v,g,w,b;for(this.$container=e,this.addPlayer=t(this.addPlayer,this),n.__super__.constructor.call(this,this.$container),this.championTabs=this.tabs,this.abilityTabs=[],f=this.championTabs,o=0,l=f.length;l>o;o++)b=f[o],this.abilityTabs.push(new TabContainer($(b.$target)));for(v=this.abilityTabs,h=0,u=v.length;u>h;h++)for(i=v[h],g=i.tabs,c=0,p=g.length;p>c;c++)s=g[c],this.addPlayer(s);for(w=this.championTabs,r=function(e){return function(t){return t.onDeactivate(function(){var t,n,s,a,r,o,h,c;for(o=e.abilityTabs,c=[],a=0,n=o.length;n>a;a++){for(i=o[a],h=i.tabs,r=0,s=h.length;s>r;r++)t=h[r],t.player&&(t.player.paused||t.player.pause(),t.player.currentTime(0));c.push(i.deactivate())}return c}),t.onActivate(function(){var i;return i=e.abilityTabs[e.championTabs.indexOf(t)].tabs[0],i.activate()})}}(this),d=0,m=w.length;m>d;d++)a=w[d],r(a)}return i(n,e),n.prototype.addPlayer=function(e){return e.player=null,this.videoReady=!1,this.videoReadyCB=null,e.onActivate(function(t){return function(){var i;return t.videoJsId=e.$target.find(".video-wrapper .video-container").data("videoJsId"),t.videoJsId&&!e.player?(i={techOrder:["html5"],loop:"true",width:"640",height:"360",bigPlayButton:!1,children:{controlBar:{children:{muteToggle:!0,volumeControl:!1,progressControl:!1,remainingTimeDisplay:!1,durationDisplay:!1,timeDivider:!1,currentTimeDisplay:!1,playToggle:!1,fullscreenToggle:!0}}}},0===t.abilityTabs.indexOf(e.parent)&&0===e.parent.tabs.indexOf(e)||(i.autoplay="true"),e.player=videojs(t.videoJsId,i,function(){return t.videoReady=!0,"function"==typeof t.videoReadyCB?t.videoReadyCB():void 0}),e.onDeactivate(function(){return e.player&&!e.player.paused?e.player.pause():void 0})):e.player.paused?e.player.play():void 0}}(this))},n}(this.TabContainer)}.call(this),function(){var e,t=function(e,t){return function(){return e.apply(t,arguments)}};e=function(){function e(){this.addCallback=t(this.addCallback,this),this.apiReady=t(this.apiReady,this);var e,i;this.ready=!1,this.completeCallbacks=[],window.onYouTubeIframeAPIReady=this.apiReady,i=document.createElement("script"),i.src="https://www.youtube.com/iframe_api",e=document.getElementsByTagName("script")[0],e.parentNode.insertBefore(i,e)}return e.prototype.apiReady=function(){var e,t,i,n,s;for(this.ready=!0,s=this.completeCallbacks,i=t=0,n=s.length;n>t;i=++t)e=s[i],"function"==typeof e&&e();return this.completeCallbacks=[]},e.prototype.addCallback=function(e){return this.ready?e():this.completeCallbacks.push(e)},e}(),window.youTubeLoader=new e}.call(this),function(){var e,t=function(e,t){return function(){return e.apply(t,arguments)}};e=function(){function e(e){this.$container=e,this.resize=t(this.resize,this),this.close=t(this.close,this),this.open=t(this.open,this),this.onResize=t(this.onResize,this),this.onClose=t(this.onClose,this),this.onOpen=t(this.onOpen,this),this.active=!1,this.openCallbacks=[],this.closeCallbacks=[],this.resizeCallbacks=[],this.$container.data("zs-modal",this),this.$container.on("click",function(e){return function(t){return 0!==$(t.target).parents(".background").length||$(t.target).hasClass("background")?e.close():void 0}}(this)),$(window).resize(this.resize)}return e.prototype.onOpen=function(e){return this.openCallbacks.push(e)},e.prototype.onClose=function(e){return this.closeCallbacks.push(e)},e.prototype.onResize=function(e){return this.resizeCallbacks.push(e)},e.prototype.open=function(){var e,t,i,n,s;for(this.active=!0,$("body").toggleClass("no-scroll"),this.$container.fadeIn(500),n=this.openCallbacks,s=[],t=0,i=n.length;i>t;t++)e=n[t],"function"==typeof e?s.push(e()):s.push(void 0);return s},e.prototype.close=function(){var e,t,i,n,s;for(this.active=!1,$("body").toggleClass("no-scroll"),this.$container.fadeOut(500),n=this.closeCallbacks,s=[],t=0,i=n.length;i>t;t++)e=n[t],"function"==typeof e?s.push(e()):s.push(void 0);return s},e.prototype.resize=function(){var e,t,i,n,s;if(this.active){for(n=this.resizeCallbacks,s=[],t=0,i=n.length;i>t;t++)e=n[t],"function"==typeof e?s.push(e()):s.push(void 0);return s}},e}(),$(document).ready(function(){return $(".zs-modal").each(function(){return new e($(this))})})}.call(this),function(){var e,t,i,n=function(e,t){return function(){return e.apply(t,arguments)}};e=function(){function e(e,t){this.addCallback=n(this.addCallback,this),this.wrapItUp=n(this.wrapItUp,this),this.handleComplete=n(this.handleComplete,this),this.handleProgress=n(this.handleProgress,this),this.$container=$(e),this.completeCallbacks=[],this.handledComplete=!1,this.htmlProgress=0,window.isBrowser.IE8||window.isBrowser.IE9||window.isBrowser.Mobile?(this.htmlProgress=1,this.handleComplete()):(this.preloadComplete=!1,this.$mask=this.$container.find(".mask"),this.queue=new createjs.LoadQueue(!0,"",!0),this.queue.loadManifest(t),this.queue.on("progress",this.handleProgress),this.queue.on("complete",function(e){return function(){return e.htmlProgress=1,e.handleComplete()}}(this)))}return e.prototype.handleProgress=function(e){var t;return t=e.loaded,this.$mask.css({height:100-100*t+"%"})},e.prototype.handleComplete=function(e){return this.htmlProgress>=.99&&!this.handledComplete?(this.handledComplete=!0,setTimeout(this.wrapItUp,800)):void 0},e.prototype.wrapItUp=function(){var e,t,i,n,s;if(!this.preloadComplete){for(this.preloadComplete=!0,this.$container.fadeOut(1e3),$("body").removeClass("loading"),s=this.completeCallbacks,i=t=0,n=s.length;n>t;i=++t)e=s[i],"function"==typeof e&&e();return this.completeCallbacks=[]}},e.prototype.addCallback=function(e){return this.preloadComplete?e():this.completeCallbacks.push(e)},e}(),$(document).ready(function(){return t(),window.dravenDay2016MerchLink&&"about:blank"!==window.dravenDay2016MerchLink||$("#draven-day-container .section-merch").remove(),window.youTubeLoader.addCallback(function(){var e,t;return e=$(".title-video .video-wrapper .iframe-container .top-video"),t=new YT.Player(e.get(0),{playerVars:{wmode:"transparent",showinfo:0,loop:1,frameborder:0,rel:0,modestbranding:0},videoId:e.data("youtube-id"),height:"360",width:"640",events:{onReady:function(e){}}})})}),i=function(){return window.dravenSetupNav(),window.preloader.addCallback(function(){return $("body").addClass("axes")}),setTimeout(function(){return $(".bundles-sets .slick-carousel .slides").slick({dots:!0,prevArrow:".bundles-sets .slick-carousel .prevArrow",nextArrow:".bundles-sets .slick-carousel .nextArrow"})},500)},t=function(){return window.prepreloader=new e("#pre-preloader",[window.riotPromoInterface.versionedAssetPath+"/images/intro-full-trimmed.png"]),window.prepreloader.addCallback(function(){return window.preloader=new e("#preloader",[window.riotPromoInterface.versionedAssetPath+"/images/background.gif",window.riotPromoInterface.versionedAssetPath+"/images/bundle-5.jpg",window.riotPromoInterface.versionedAssetPath+"/images/bundle-cant-touch.jpg",window.riotPromoInterface.versionedAssetPath+"/images/bundle-definitely.jpg",window.riotPromoInterface.versionedAssetPath+"/images/bundle-mustache.jpg",window.riotPromoInterface.versionedAssetPath+"/images/bundle-ok.jpg",window.riotPromoInterface.versionedAssetPath+"/images/comments-frame-bottom.png",window.riotPromoInterface.versionedAssetPath+"/images/comments-frame-middle.png",window.riotPromoInterface.versionedAssetPath+"/images/comments-frame-top.png",window.riotPromoInterface.versionedAssetPath+"/images/divider.png",window.riotPromoInterface.versionedAssetPath+"/images/download.jpg",window.riotPromoInterface.versionedAssetPath+"/images/draven-axes.png",window.riotPromoInterface.versionedAssetPath+"/images/draven-mystery-box.png",window.riotPromoInterface.versionedAssetPath+"/images/dravenize-add.png",window.riotPromoInterface.versionedAssetPath+"/images/dravenize-back.png",window.riotPromoInterface.versionedAssetPath+"/images/dravenize-background.jpg",window.riotPromoInterface.versionedAssetPath+"/images/dravenize-crop-guide.png",window.riotPromoInterface.versionedAssetPath+"/images/dravenize-download.png",window.riotPromoInterface.versionedAssetPath+"/images/dravenize-item-brow.png",window.riotPromoInterface.versionedAssetPath+"/images/dravenize-item-close.png",window.riotPromoInterface.versionedAssetPath+"/images/dravenize-item-earring.png",window.riotPromoInterface.versionedAssetPath+"/images/dravenize-item-hair.png",window.riotPromoInterface.versionedAssetPath+"/images/dravenize-item-stache.png",window.riotPromoInterface.versionedAssetPath+"/images/dravenize-loading.gif",window.riotPromoInterface.versionedAssetPath+"/images/dravenize-upload.png",window.riotPromoInterface.versionedAssetPath+"/images/dravenize-webcam-error.png",window.riotPromoInterface.versionedAssetPath+"/images/dravenize-webcam.png",window.riotPromoInterface.versionedAssetPath+"/images/face-bottom.png",window.riotPromoInterface.versionedAssetPath+"/images/face-middle.png",window.riotPromoInterface.versionedAssetPath+"/images/face-pupil.png",window.riotPromoInterface.versionedAssetPath+"/images/face-top.png",window.riotPromoInterface.versionedAssetPath+"/images/jewel.png",window.riotPromoInterface.versionedAssetPath+"/images/merch-background.png",window.riotPromoInterface.versionedAssetPath+"/images/section-separator.png",window.riotPromoInterface.versionedAssetPath+"/images/set-draven-day.jpg"]),window.isBrowser.IE8||window.isBrowser.IE9||window.isBrowser.Mobile?i():(jQuery("#draven-day-container").hide(),jQuery("#intro-draven-head").fadeIn(200,function(){var e;return null!=(e=jQuery("#intro-draven-head #welcome-audio").get(0))&&"function"==typeof e.play?e.play():void 0}),setTimeout(function(){return jQuery("#intro-draven-head .draven-face-full").addClass("big"),setTimeout(function(){return jQuery("#intro-draven-head").fadeOut(1e3),jQuery("#draven-day-container").show(),i()},3e3)},3e3))})}}.call(this),function(){window.dravenSetupNav=function(){var e,t,i;return e=$(".container-top"),i=$(".fixed-nav"),t=.8*e.height(),$(window).on("resize",function(){return t=.8*e.height()}),$(window).on("scroll",function(){return $(window).scrollTop()>t?i.css("top",0):i.css("top","-200px")}),$(window).trigger("scroll")}}.call(this),function(){var e,t,i,n,s=function(e,t){return function(){return e.apply(t,arguments)}};n=function(){function t(t,n){var a;this.$container=t,this.$modal=n,this.close=s(this.close,this),this.openAbility=s(this.openAbility,this),this.$modalClose=this.$modal.find(".close-btn"),this.modal=null!=(a=this.$modal)?a.data("zs-modal"):void 0,this.carousel=new e(this.$modal.find(".carousel")),this.$container.find("div[data-trigger-slide]").each(function(e){return function(t,n){return new i($(n),e)}}(this)),this.$modalClose.on("click",function(e){return function(){var t;return null!=(t=e.modal)?t.close():void 0}}(this))}return t.prototype.openAbility=function(e){var t,i;return null!=(t=this.carousel)&&t.goTo(e),null!=(i=this.modal)?i.open():void 0},t.prototype.close=function(){},t}(),i=function(){function e(e,t){this.$container=e,this.parent=t,this.slideTarget=parseInt(this.$container.data("trigger-slide"))-1,this.slideTarget<0&&(this.slideTarget=0),this.$container.on("click",function(e){return function(){return e.parent.openAbility(e.slideTarget)}}(this))}return e}(),e=function(){function e(e){this.$container=e,this.goTo=s(this.goTo,this),this.prev=s(this.prev,this),this.next=s(this.next,this),this.destroy=s(this.destroy,this),this.deactivate=s(this.deactivate,this),this.activate=s(this.activate,this),this.$slides=this.$container.find(".slide"),this.$prev=this.$container.find(".prevArrowHolder"),this.$next=this.$container.find(".nextArrowHolder"),this.activeSlide=null,this.slides=[],this.$slides.each(function(e){return function(i,n){return e.slides.push(new t($(n)))}}(this)),this.$prev.on("click",this.prev),this.$next.on("click",this.next)}return e.prototype.activate=function(){return this.goTo(0)},e.prototype.deactivate=function(){var e,t,i,n;for(i=this.slides,e=0,t=i.length;t>e;e++)n=i[e],n.deactivate();return!0},e.prototype.destroy=function(){var e,t,i,n;for(i=this.slides,e=0,t=i.length;t>e;e++)n=i[e],n.destroy();return!0},e.prototype.next=function(){var e;return e=null!==this.activeSlide?this.activeSlide+1:0,e>=this.slides.length&&(e=0),this.goTo(e)},e.prototype.prev=function(){var e;return e=null!==this.activeSlide?this.activeSlide-1:0,0>e&&(e=this.slides.length-1),this.goTo(e)},e.prototype.goTo=function(e){var t;return this.slides[e]?(null!=(t=this.slides[this.activeSlide])&&t.deactivate(),this.slides[e].activate(),this.activeSlide=e):void 0},e}(),t=function(){function e(e){this.$container=e,this.addPlayer=s(this.addPlayer,this),this.destroy=s(this.destroy,this),this.deactivate=s(this.deactivate,this),this.activate=s(this.activate,this),this.player=null}return e.prototype.activate=function(){var e;return this.player?this.player.playVideo():(e=this.$container.find(".video-wrapper .video-container > div"),e.length&&(this.player=new YT.Player(e.attr("id"),{playerVars:{wmode:"transparent",showinfo:0,autoplay:1,loop:1,frameborder:0,rel:0,modestbranding:0,playlist:e.data("youtube-id")},videoId:e.data("youtube-id"),height:"360",width:"640",events:{onReady:function(e){}}}))),this.$container.show()},e.prototype.deactivate=function(){return this.player&&this.player.pauseVideo(),this.$container.hide()},e.prototype.destroy=function(){return this.player?(this.player.destroy(),delete this.player):void 0},e.prototype.addPlayer=function(e){},e}(),$(document).ready(function(){var e,t,i,s;return e=new n($(".champion-1-section"),$(".champion-1-ability-video-modal")),e.modal.onClose(function(){return e.carousel.destroy()}),t=new n($(".champion-2-section"),$(".champion-2-ability-video-modal")),t.modal.onClose(function(){return t.carousel.destroy()}),i=new n($(".champion-3-section"),$(".champion-3-ability-video-modal")),i.modal.onClose(function(){return i.carousel.destroy()}),s=new n($(".champion-4-section"),$(".champion-4-ability-video-modal")),s.modal.onClose(function(){return s.carousel.destroy()})})}.call(this),function(){var e,t=function(e,t){return function(){return e.apply(t,arguments)}};e=function(){function e(e){var i,n;this.$element=e,this.mouseMoveHandler=t(this.mouseMoveHandler,this),this.setData=t(this.setData,this),this.initialLeft=parseInt(this.$element.css("left"))||0,this.initialTop=parseInt(this.$element.css("top"))||0,this.mouseX=null,this.mouseY=null,this.viewport=null,this.setData(),n=!1,i=!1,$(window).on("resize scroll",function(e){return function(t){return n?void 0:(e.setData(t),n=!0,setTimeout(function(){return n=!1},50))}}(this)),$(document).on("mousemove",function(e){return function(t){return i?void 0:(e.mouseMoveHandler(t),i=!0,setTimeout(function(){return i=!1},100))}}(this))}return e.prototype.setData=function(){return this.viewport={width:Math.max(document.documentElement.clientWidth,window.innerWidth||0),height:$(".container-top").height()},this.position={x:this.$element.offset().left,y:this.$element.offset().top-$(window).scrollTop()}},e.prototype.mouseMoveHandler=function(e){var t,i;return this.mouseX=e.clientX,this.mouseY=e.clientY,this.diff={x:this.mouseX-this.position.x,y:this.mouseY-this.position.y},t=this.diff.x/this.viewport.width*220+42.5,t>100&&(t=100),-10>t&&(t=-10),t+="%",i=this.diff.y/this.viewport.height*40+this.mouseY/this.viewport.height*50,i>75&&(i=75),0>i&&(i=0),i+="%",this.$element.css("left",t),this.$element.css("top",i)},e}(),$(document).ready(function(){var t,i;return t=new e($(".eye-left-container img")),i=new e($(".eye-right-container img"))})}.call(this),function(){var e,t,i,n,s,a=function(e,t){return function(){return e.apply(t,arguments)}},r=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty;e=function(){function e(e){this.$element=e,this.updateImage=a(this.updateImage,this),this.stepTo=a(this.stepTo,this),this.webcamSupport=!0,this.usingWebcam=!0,this.$step1=this.$element.find(".step1"),this.$step2=this.$element.find(".step2"),this.$step3=this.$element.find(".step3"),this.$sourceImgHolder=this.$element.find(".source-image-holder"),this.$sourceImg=$(" "),this.$sourceImg.appendTo(this.$sourceImgHolder),this.rotation=0,this.steps={intro:new i(this.$step1,this),webcam:new n(this.$step2,this),stickers:new s(this.$step3,this)},this.activeStep=0,this.stepTo("intro")}return e.prototype.stepTo=function(e){return setTimeout(function(t){return function(){var i,n,s,a;t.activeStep=e,n=t.steps,s=[];for(i in n)a=n[i],i===e?s.push(a.activate()):s.push(a.deactivate());return s}}(this),0)},e.prototype.updateImage=function(e,t){return null==t&&(t=!1),this.$sourceImg.remove(),t?this.$sourceImg=$(e):this.$sourceImg=$(' '),this.$sourceImgHolder.append(this.$sourceImg)},e}(),t=function(){function e(e,t){this.$element=e,this.parent=t,this.deactivate=a(this.deactivate,this),this.activate=a(this.activate,this),this.active=!1}return e.prototype.activate=function(){return this.active=!0,this.$element.show()},e.prototype.deactivate=function(){return this.active=!1,this.$element.hide()},e}(),i=function(e){function t(e,i){this.$element=e,this.parent=i,this.activate=a(this.activate,this),t.__super__.constructor.apply(this,arguments),this.$uploadField=this.$element.find("#dravenize-image-upload"),this.$uploadImg=this.$element.find("#dravenize-image-uploaded"),this.$element.find(".button-webcam").on("click",function(e){return function(){return e.parent.usingWebcam=!0,e.parent.stepTo("webcam")}}(this)),this.$element.find(".button-upload").on("click",function(e){return function(){return e.$uploadField.trigger("click")}}(this)),this.$element.find(".button-upload-error").on("click",function(e){return function(){return e.$uploadField.trigger("click")}}(this)),this.$uploadField.on("change",function(e){return function(t){var i,n,s;return i=null!=t&&null!=(n=t.target)&&null!=(s=n.files)?s[0]:void 0,i?(e.$element.removeClass("upload-error"),loadImage.parseMetaData(i,function(t){var n;return e.parent.rotation=0,e.parent.rotation=null!=(n=t.exif)?n.get("Orientation"):void 0,loadImage(i,function(t){return"error"===t.type?e.$element.addClass("upload-error"):(e.parent.updateImage(t,!0),e.parent.usingWebcam=!1,e.parent.stepTo("stickers"))},{canvas:!0})})):e.$element.addClass("upload-error")}}(this))}return r(t,e),t.prototype.activate=function(){return t.__super__.activate.apply(this,arguments),this.parent.updateImage(null),this.parent.webcamSupport?this.$element.removeClass("webcam-error"):this.$element.addClass("webcam-error")},t}(t),n=function(e){function t(e,i){this.$element=e,this.parent=i,this.reset=a(this.reset,this),this.close=a(this.close,this),this.capture=a(this.capture,this),this.activate=a(this.activate,this),t.__super__.constructor.apply(this,arguments),this.$webcamBackground=$("#dravenize-webcam-background"),this.$webcamContainer=$("#dravenize-webcam-container"),this.$webcamContainer.find(".back-btn").on("click",this.reset)}return r(t,e),t.prototype.activate=function(){return t.__super__.activate.apply(this,arguments),this.$captureBtn=this.$webcamContainer.find(".capture-btn"),this.$loadingBtn=this.$webcamContainer.find(".loading-btn"),this.$captureFlash=this.$webcamContainer.find(".capture-flash"),this.parent.updateImage(null),this.$webcamContainer.show(),this.$webcamBackground.fadeIn(),this.width=parseInt(this.$element.outerWidth())+100,this.height=parseInt(this.$element.outerHeight())+75,this.$webcamContainer.css({left:parseInt(($(window).innerWidth()-this.width)/2),top:parseInt(($(window).innerHeight()-this.height)/2)}),Webcam.on("error",function(e){return function(){return e.parent.webcamSupport=!1,e.close(),e.parent.stepTo("intro")}}(this)),Webcam.setSWFLocation("//news.cdn.leagueoflegends.com/public/images/misc/webcam.swf"),Webcam.set({width:this.width,height:this.height,dest_width:1280,dest_height:960,crop_width:1280,crop_height:960,image_format:"jpeg",jpeg_quality:90,force_flash:!0,flip_horiz:!0,fps:15}),Webcam.attach("#dravenize-webcam"),Webcam.on("live",function(e){return function(){return e.$captureBtn.show(),e.$loadingBtn.show()}}(this)),this.$captureBtn.on("click",this.capture)},t.prototype.capture=function(){return this.$captureBtn.hide(),this.$loadingBtn.show(),setTimeout(function(e){return function(){return Webcam.snap(function(){return e.parent.usingWebcam=!0,e.parent.stepTo("stickers"),e.close()},e.parent.$sourceImg.get(0))}}(this),50)},t.prototype.close=function(){return this.$webcamBackground.fadeOut(),this.$webcamContainer.hide()},t.prototype.reset=function(){return Webcam.reset(),this.close(),this.parent.stepTo("intro")},t}(t),s=function(e){function t(e,i){this.$element=e,this.parent=i,this.addImage=a(this.addImage,this),this.loadImage=a(this.loadImage,this),this.addEarring=a(this.addEarring,this),this.addBrow=a(this.addBrow,this),this.addStache=a(this.addStache,this),this.addHair=a(this.addHair,this),this.openItems=a(this.openItems,this),this.closeItems=a(this.closeItems,this),this.sizeCanvas=a(this.sizeCanvas,this),this.save=a(this.save,this),this.sealBackground=a(this.sealBackground,this),this.lockBackground=a(this.lockBackground,this),this.setupBackground=a(this.setupBackground,this),this.reset=a(this.reset,this),this.animate=a(this.animate,this),this.removeSelected=a(this.removeSelected,this),this.onUnselected=a(this.onUnselected,this),this.onSelected=a(this.onSelected,this),this.activate=a(this.activate,this),t.__super__.constructor.apply(this,arguments),this.$element.find(".back-btn").on("click",this.reset),this.$outputImg=this.$element.find(".output-image"),this.$downloadLink=this.$element.find(".download-link"),this.$removeLink=this.$element.find(".item-remove"),this.$removeLink.on("click",this.removeSelected),this.$element.find(".download-button").on("click",this.save),this.$element.find(".items-open").on("click",this.openItems),this.$element.find(".crop-done").on("click",this.lockBackground),this.$items=this.$element.find(".items-container"),this.$items.find(".item-close").on("click",this.closeItems),this.$items.find(".item-hair").on("click",this.addHair),this.$items.find(".item-stache").on("click",this.addStache),this.$items.find(".item-brow").on("click",this.addBrow),this.$items.find(".item-earring").on("click",this.addEarring),this.loadImage("dravenize-item-hair"),this.loadImage("dravenize-item-stache"),this.loadImage("dravenize-item-brow"),this.loadImage("dravenize-item-earring"),this.loadImage("dravenize-crop-guide")}return r(t,e),t.prototype.activate=function(){return t.__super__.activate.apply(this,arguments),this.fabricCanvas=new fabric.Canvas("dravenize-canvas"),this.fabricCanvas.controlsAboveOverlay=!0,this.selectedObject=null,this.fabricCanvas.on({"object:selected":this.onSelected,"selection:cleared":this.onUnselected}),this.sizeCanvas(),fabric.util.requestAnimFrame(this.animate,this.fabricCanvas.getElement()),this.parent.usingWebcam||this.$element.addClass("cropping-time"),setTimeout(function(e){return function(){return e.parent.usingWebcam?e.sealBackground():e.setupBackground()}}(this),1500)},t.prototype.onSelected=function(e){return this.selectedObject=this.fabricCanvas.getObjects().indexOf(e.target),this.$removeLink.show()},t.prototype.onUnselected=function(){return this.selectedObject=null,this.$removeLink.hide()},t.prototype.removeSelected=function(){return null!==this.selectedObject?this.fabricCanvas.remove(this.fabricCanvas.item(this.selectedObject)):void 0},t.prototype.animate=function(){},t.prototype.reset=function(){return this.fabricCanvas.dispose(),this.$element.removeClass("cropping-time"),this.$element.removeClass("cropping-time-ready"),this.$element.removeClass("items-open"),this.parent.stepTo("intro"),this.parent.usingWebcam?Webcam.reset():void 0},t.prototype.setupBackground=function(){var e,t,i,n,s;return e=new fabric.Image($("#dravenize-crop-guide").get(0)),this.fabricCanvas.setOverlayImage(e,this.fabricCanvas.renderAll.bind(this.fabricCanvas),{originX:"left",originY:"top"}),s=this.parent.$sourceImg.attr("width"),t=this.parent.$sourceImg.attr("height"),.75*s>t?(n=parseInt(512),i=parseInt(t/s*n)):(i=parseInt(384),n=parseInt(s/t*i)),this.backgroundImg=new fabric.Image(this.parent.$sourceImg.get(0),{left:320,top:240,width:n,height:i,originX:"center",originY:"center"}),2===this.parent.rotation?this.backgroundImg.flipX=!0:3===this.parent.rotation?this.backgroundImg.setAngle(180).setCoords():4===this.parent.rotation?this.backgroundImg.flipY=!0:5===this.parent.rotation?(this.backgroundImg.flipY=!0,this.backgroundImg.setAngle(90).setCoords()):6===this.parent.rotation?this.backgroundImg.setAngle(90).setCoords():7===this.parent.rotation?(this.backgroundImg.flipX=!0,this.backgroundImg.setAngle(90).setCoords()):8===this.parent.rotation&&this.backgroundImg.setAngle(-90).setCoords(),this.backgroundImg.centeredScaling=!0,this.backgroundImg.borderColor="grey",this.backgroundImg.cornerColor="white",this.backgroundImg.transparentCorners=!1,this.backgroundImg.setControlVisible("ml",!1).setControlVisible("mr",!1).setControlVisible("mb",!1).setControlVisible("mt",!1),this.fabricCanvas.add(this.backgroundImg),this.$element.addClass("cropping-time-ready")},t.prototype.lockBackground=function(){return this.$element.removeClass("cropping-time"),this.$element.removeClass("cropping-time-ready"),this.fabricCanvas.setOverlayImage("",this.fabricCanvas.renderAll.bind(this.fabricCanvas),{originX:"left",originY:"top"}),this.backgroundImg.width*=2,this.backgroundImg.height*=2,this.backgroundImg.top-=120,this.backgroundImg.left-=160,this.backgroundImg.top*=2,this.backgroundImg.left*=2,this.backgroundImg.selectable=!1,this.fabricCanvas.renderAll(),this.openItems()},t.prototype.sealBackground=function(){return this.backgroundImg=new fabric.Image(this.parent.$sourceImg.get(0),{left:0,top:0,width:640,height:480}),this.backgroundImg.selectable=!1,this.backgroundImg.flipX=!0,this.fabricCanvas.add(this.backgroundImg),this.openItems()},t.prototype.save=function(){var e;return e=this.fabricCanvas.toDataURL({format:"jpeg",quality:.8,multiplier:2}),window.isBrowser.IE||window.isBrowser.Chrome||window.isBrowser.Firefox||window.open(e),window.html5Download(e,"draven.jpg","image/jpeg"),setTimeout(function(e){return function(){return e.sizeCanvas()}}(this),0)},t.prototype.sizeCanvas=function(){return this.fabricCanvas.setDimensions({width:this.$element.outerWidth()+"px",height:parseInt(.75*this.$element.outerWidth())+"px"},{cssOnly:!0})},t.prototype.closeItems=function(){return this.$element.removeClass("items-open")},t.prototype.openItems=function(){return this.$element.addClass("items-open")},t.prototype.addHair=function(){var e;return e=new fabric.Image($("#dravenize-item-hair").get(0)),this.addImage(e,.2,130,320),this.closeItems()},t.prototype.addStache=function(){var e;return e=new fabric.Image($("#dravenize-item-stache").get(0)),this.addImage(e,.2,320,220),this.closeItems()},t.prototype.addBrow=function(){var e;return e=new fabric.Image($("#dravenize-item-brow").get(0)),this.addImage(e,.2,180,320),this.closeItems()},t.prototype.addEarring=function(){var e;return e=new fabric.Image($("#dravenize-item-earring").get(0)),this.addImage(e,.15,240,400),this.closeItems()},t.prototype.loadImage=function(e){var t;return window.URL=window.URL||window.webkitURL,t=new XMLHttpRequest,t.open("GET",window.riotPromoInterface.versionedAssetPath+"/images/"+e+".png",!0),t.responseType="blob",t.onload=function(i){return function(i){var n;return 200===t.status?(n=document.createElement("img"),n.id=e,n.className="dravenize-item-for-canvas",function(e){return e.onload=function(t){var i;return null!=(i=window.URL)?i.revokeObjectURL(e.src):void 0}}(n),n.src=window.URL.createObjectURL(t.response),document.body.appendChild(n)):void 0}}(this),t.send()},t.prototype.addImage=function(e,t,i,n){return e.scaleX=t,e.scaleY=t,e.originX="center",e.originY="center",e.top=i,e.left=n,e.centeredScaling=!0,e.borderColor="grey",e.cornerColor="white",e.transparentCorners=!1,e.setControlVisible("ml",!1).setControlVisible("mr",!1).setControlVisible("mb",!1).setControlVisible("mt",!1),this.fabricCanvas.add(e),this.fabricCanvas.setActiveObject(this.fabricCanvas.item(this.fabricCanvas.getObjects().length-1))},t}(t),$(document).ready(function(){var t;return t=new e($("#dravenize-me"))})}.call(this),function(){var e,t,i,n,s,a,r,o=function(e,t){return function(){return e.apply(t,arguments)}},h=function(e,t){function i(){this.constructor=e}for(var n in t)c.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},c={}.hasOwnProperty;t=function(){function e(e){var t,i;this.$container=e,this.windowFeatures=o(this.windowFeatures,this),t=window.location.href,i="/draven-day-2016",t.indexOf(i)>=0&&(t=t.substr(0,t.indexOf(i)),t+=""+i),this.url=t,this.width=500,this.height=300}return e.prototype.windowFeatures=function(){var e;return e=[], e.push("left="+Math.round(($(window).innerWidth()-this.width)/2)),e.push("top="+Math.round(($(window).innerHeight()-this.height)/2)),e.push("width="+this.width),e.push("height="+this.height),e.join(",")},e}(),i=function(e){function t(e){this.$container=e,this.onClick=o(this.onClick,this),t.__super__.constructor.apply(this,arguments),this.tweetText=this.$container.data("tweet"),this.shareUrl="https://twitter.com/intent/tweet?url="+encodeURIComponent(this.url)+"&text="+encodeURIComponent(this.tweetText),this.$container.on("click",this.onClick)}return h(t,e),t.prototype.onClick=function(){return window.open(this.shareUrl,"_tweetThis",this.windowFeatures())},t}(t),e=function(e){function t(e){this.$container=e,this.onClick=o(this.onClick,this),t.__super__.constructor.apply(this,arguments),this.shareUrl="https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(this.url),this.$container.on("click",this.onClick)}return h(t,e),t.prototype.onClick=function(){return window.open(this.shareUrl,"_shareThis",this.windowFeatures())},t}(t),r=new i($("#draven-day-container div.top-menu div.shoshal .the-twit")),a=new e($("#draven-day-container div.top-menu div.shoshal .the-face")),s=new i($("#draven-day-container div.content-wrapper div.fixed-nav div.fixed-shoshal div.the-twit")),n=new e($("#draven-day-container div.content-wrapper div.fixed-nav div.fixed-shoshal div.the-face"))}.call(this),function(e){function t(t,i,n){function s(e){var t=e.split(/[:;,]/),i=t[1],n="base64"==t[2]?atob:decodeURIComponent,s=n(t.pop()),a=s.length,r=0,o=new Uint8Array(a);for(r;a>r;++r)o[r]=s.charCodeAt(r);return new v([o],{type:i})}function a(e,t){if("download"in m)return m.href=e,m.setAttribute("download",w),m.innerHTML="downloading...",p.body.appendChild(m),setTimeout(function(){m.click(),p.body.removeChild(m),t===!0&&setTimeout(function(){c.URL.revokeObjectURL(m.href)},250)},66),!0;var i=p.createElement("iframe");p.body.appendChild(i),t||(e="data:"+e.replace(/^data:([\w\/\-\+]+)/,d)),i.src=e,setTimeout(function(){p.body.removeChild(i)},333)}var r,o,h,c=e,d="application/octet-stream",l=n||d,u=t,p=document,m=p.createElement("a"),f=function(e){return String(e)},v=c.Blob||c.MozBlob||c.WebKitBlob||f,g=c.MSBlobBuilder||c.WebKitBlobBuilder||c.BlobBuilder,w=i||"download";if("true"===String(this)&&(u=[u,l],l=u[0],u=u[1]),String(u).match(/^data\:[\w+\-]+\/[\w+\-]+[,;]/))return navigator.msSaveBlob?navigator.msSaveBlob(s(u),w):a(u);try{r=u instanceof v?u:new v([u],{type:l})}catch(b){g&&(o=new g,o.append([u]),r=o.getBlob(l))}if(navigator.msSaveBlob)return navigator.msSaveBlob(r,w);if(c.URL)a(c.URL.createObjectURL(r),!0);else{if("string"==typeof r||r.constructor===f)try{return a("data:"+l+";base64,"+c.btoa(r))}catch(b){return a("data:"+l+","+encodeURIComponent(r))}h=new FileReader,h.onload=function(e){a(this.result)},h.readAsDataURL(r)}return!0}e.html5Download=t}(window);var foo="bar"; // Copyright (c) 2012 - 2015 Joseph Huckaby // Licensed under the MIT License !function(e){var t={version:"1.0.6",protocol:location.protocol.match(/https/i)?"https":"http",swfURL:"",loaded:!1,live:!1,userMedia:!0,params:{width:0,height:0,dest_width:0,dest_height:0,image_format:"jpeg",jpeg_quality:90,force_flash:!1,flip_horiz:!1,fps:30,upload_name:"webcam",constraints:null},hooks:{},init:function(){var t=this;this.mediaDevices=navigator.mediaDevices&&navigator.mediaDevices.getUserMedia?navigator.mediaDevices:navigator.mozGetUserMedia||navigator.webkitGetUserMedia?{getUserMedia:function(e){return new Promise(function(t,i){(navigator.mozGetUserMedia||navigator.webkitGetUserMedia).call(navigator,e,t,i)})}}:null,e.URL=e.URL||e.webkitURL||e.mozURL||e.msURL,this.userMedia=this.userMedia&&!!this.mediaDevices&&!!e.URL,navigator.userAgent.match(/Firefox\D+(\d+)/)&&parseInt(RegExp.$1,10)<21&&(this.userMedia=null),this.userMedia&&e.addEventListener("beforeunload",function(e){t.reset()})},attach:function(i){if("string"==typeof i&&(i=document.getElementById(i)||document.querySelector(i)),!i)return this.dispatch("error","Could not locate DOM element to attach to.");this.container=i,i.innerHTML="";var n=document.createElement("div");i.appendChild(n),this.peg=n,this.params.width||(this.params.width=i.offsetWidth),this.params.height||(this.params.height=i.offsetHeight),this.params.dest_width||(this.params.dest_width=this.params.width),this.params.dest_height||(this.params.dest_height=this.params.height),this.params.force_flash&&(this.userMedia=null),"number"!=typeof this.params.fps&&(this.params.fps=30);var s=this.params.width/this.params.dest_width,a=this.params.height/this.params.dest_height;if(this.userMedia){var r=document.createElement("video");r.setAttribute("autoplay","autoplay"),r.style.width=""+this.params.dest_width+"px",r.style.height=""+this.params.dest_height+"px",1==s&&1==a||(i.style.overflow="hidden",r.style.webkitTransformOrigin="0px 0px",r.style.mozTransformOrigin="0px 0px",r.style.msTransformOrigin="0px 0px",r.style.oTransformOrigin="0px 0px",r.style.transformOrigin="0px 0px",r.style.webkitTransform="scaleX("+s+") scaleY("+a+")",r.style.mozTransform="scaleX("+s+") scaleY("+a+")",r.style.msTransform="scaleX("+s+") scaleY("+a+")",r.style.oTransform="scaleX("+s+") scaleY("+a+")",r.style.transform="scaleX("+s+") scaleY("+a+")"),i.appendChild(r),this.video=r;var o=this;this.mediaDevices.getUserMedia({audio:!1,video:this.params.constraints||{mandatory:{minWidth:this.params.dest_width,minHeight:this.params.dest_height}}}).then(function(t){r.src=e.URL.createObjectURL(t)||t,o.stream=t,o.loaded=!0,o.live=!0,o.dispatch("load"),o.dispatch("live"),o.flip()})["catch"](function(e){return o.dispatch("error","Could not access webcam: "+e.name+": "+e.message,e)})}else{e.Webcam=t;var h=document.createElement("div");h.innerHTML=this.getSWFHTML(),i.appendChild(h)}if(this.params.crop_width&&this.params.crop_height){var c=Math.floor(this.params.crop_width*s),d=Math.floor(this.params.crop_height*a);i.style.width=""+c+"px",i.style.height=""+d+"px",i.style.overflow="hidden",i.scrollLeft=Math.floor(this.params.width/2-c/2),i.scrollTop=Math.floor(this.params.height/2-d/2)}else i.style.width=""+this.params.width+"px",i.style.height=""+this.params.height+"px"},reset:function(){if(this.preview_active&&this.unfreeze(),this.unflip(),this.userMedia){if(this.stream)if(this.stream.getVideoTracks){var e=this.stream.getVideoTracks();e&&e[0]&&e[0].stop&&e[0].stop()}else this.stream.stop&&this.stream.stop();delete this.stream,delete this.video}this.userMedia!==!0&&this.getMovie()._releaseCamera(),this.container&&(this.container.innerHTML="",this.unflip(),delete this.container),this.loaded=!1,this.live=!1},set:function(){if(1==arguments.length)for(var e in arguments[0])this.params[e]=arguments[0][e];else this.params[arguments[0]]=arguments[1]},on:function(e,t){e=e.replace(/^on/i,"").toLowerCase(),this.hooks[e]||(this.hooks[e]=[]),this.hooks[e].push(t)},off:function(e,t){if(e=e.replace(/^on/i,"").toLowerCase(),this.hooks[e])if(t){var i=this.hooks[e].indexOf(t);i>-1&&this.hooks[e].splice(i,1)}else this.hooks[e]=[]},dispatch:function(){var t=arguments[0].replace(/^on/i,"").toLowerCase(),i=Array.prototype.slice.call(arguments,1);if(this.hooks[t]&&this.hooks[t].length){for(var n=0,s=this.hooks[t].length;s>n;n++){var a=this.hooks[t][n];"function"==typeof a?a.apply(this,i):"object"==typeof a&&2==a.length?a[0][a[1]].apply(a[0],i):e[a]&&e[a].apply(e,i)}return!0}return"error"==t&&alert("Webcam.js Error: "+i[0]),!1},setSWFLocation:function(e){this.swfURL=e},detectFlash:function(){var t="Shockwave Flash",i="ShockwaveFlash.ShockwaveFlash",n="application/x-shockwave-flash",s=e,a=navigator,r=!1;if("undefined"!=typeof a.plugins&&"object"==typeof a.plugins[t]){var o=a.plugins[t].description;o&&"undefined"!=typeof a.mimeTypes&&a.mimeTypes[n]&&a.mimeTypes[n].enabledPlugin&&(r=!0)}else if("undefined"!=typeof s.ActiveXObject)try{var h=new ActiveXObject(i);if(h){var c=h.GetVariable("$version");c&&(r=!0)}}catch(d){}return r},getSWFHTML:function(){var e="";if(location.protocol.match(/file/))return this.dispatch("error","Flash does not work from local disk. Please run from a web server."),'

ERROR: the Webcam.js Flash fallback does not work from local disk. Please run it from a web server.

ERROR: No Adobe Flash Player detected. Webcam.js relies on Flash for browsers that do not support getUserMedia (like yours).