(function(){var a;a=function(){function a(){}a.prototype.delayTween=function(a,b,c,d,e){return _.delay(_.bind(a.animate,a),b,c,d,e)};return a}();$(function(){return window.tweener=new a})}).call(this);(function(){var a;a=function(){function a(){this.el=$("#hero_collection");if(!this.el.length){return}this.tweener=window.tweener;this.init()}a["break"];a.bg;a.el;a.numImgs;a.numLoaded;a.heroTxt;a.logo;a.tweener;a.prototype.init=function(){var a;a=$("#container > header");this.logo=$("hgroup",this.header);this["break"]=a.find(".break_top");this.heroTxt=$("header",this.el);this.bg=$("#hero-bg",this.el);if(!window.degrade){this.logo.css("opacity",0);this["break"].css("opacity",0);this.bg.css("opacity",0);this.heroTxt.css("opacity",0)}return this.load()};a.prototype.load=function(){var a,b,c,d,e,f,g;c=jQuery.makeArray($("img",this.el));c.concat(jQuery.makeArray($("img",this.logo)));d=this;this.numImgs=c.length;this.numLoaded=0;g=[];for(e=0,f=c.length;e<f;e++){b=c[e];a=$(b);g.push(b.complete?this.show():(a.load(function(){return d.show($(this))}),a.attr("src",a.attr("src"))))}return g};a.prototype.show=function(){this.numLoaded++;if(this.numLoaded<this.numImgs){return}this.el.css("visibility","visible");if(!window.degrade){this.logo.animate({opacity:1},{duration:1500,easing:"easeOutQuad"});this["break"].delay(250).animate({opacity:1},{duration:1e3,easing:"easeOutQuad"});this.bg.delay(800).animate({opacity:1},{duration:1500,easing:"easeOutQuad"});return this.heroTxt.delay(1500).animate({opacity:1},{duration:2e3,easing:"easeOutQuad"})}};return a}();$(document).ready(function(){return new a})}).call(this);(function(){var a;var b=function(a,b){return function(){return a.apply(b,arguments)}};a=function(){function a(){this.finishPage=b(this.finishPage,this);this.anchorOver=b(this.anchorOver,this);this.anchorOut=b(this.anchorOut,this);this.init()}a.anchors;a.currentSlide;a.el;a.leftArrow;a.rightArrow;a.slides;a.index;a.numSlides;a.slideList;a.slideWidth;a.zIndex;a.prototype.init=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;this.el=$(".carousel");this.pageIndex=0;this.wrapper=$("#carousel-item-wrapper",this.el);this.itemList=$("ul",this.el);this.items=$("li",this.itemList);this.numItems=this.items.length;this.leftArrow=$(".arrow-btn.left",this.el);this.leftArrow.addClass("disabled");this.rightArrow=$(".arrow-btn.right",this.el);this.leftArrow.bind("click",_.bind(this.leftClick,this));this.rightArrow.bind("click",_.bind(this.rightClick,this));if($("html").hasClass("touch")&&$(window).width()<768){o=this.items;for(g=0,k=o.length;g<k;g++){e=o[g];$(e).css("width",window.outerWidth)}}f=0;p=this.items;for(h=0,l=p.length;h<l;h++){e=p[h];$(e).addClass("non-active");f+=$(e).outerWidth(true)}this.itemList.width(f);this.itemWidth=$(this.items[0]).outerWidth();this.numPerPage=Math.floor(this.wrapper.width()/this.itemWidth);this.wrapperWidth=this.itemWidth*this.numPerPage;this.wrapper.width(this.wrapperWidth);this.numPages=Math.ceil(this.numItems/this.numPerPage);this.anchors=$("a",this.itemList);q=this.anchors;for(i=0,m=q.length;i<m;i++){b=q[i];$(b).hover(this.anchorOver,this.anchorOut)}c=$("img",this.itemList);for(j=0,n=c.length;j<n;j++){d=c[j];a=$(d);a.css("opacity",0);if(a.attr("src")){a.animate({opacity:1},250)}else{a.load(function(){return $(this).animate({opacity:1},250)});a.attr("src",a.attr("data-src"));a.attr("data-src",null)}}return this.page(false)};a.prototype.anchorOut=function(a){var b,c,d,e,f;e=this.anchors;f=[];for(c=0,d=e.length;c<d;c++){b=e[c];if(a.currentTarget===b[0]){continue}f.push($(b).animate({opacity:"1"},{duration:300,easing:"easeOutQuad",queue:false}))}return f};a.prototype.anchorOver=function(a){var b,c,d,e,f;e=this.anchors;f=[];for(c=0,d=e.length;c<d;c++){b=e[c];if(a.currentTarget===b){continue}f.push($(b).animate({opacity:".5"},{duration:300,easing:"easeOutQuad",queue:false}))}return f};a.prototype.finishPage=function(){var a,b,c,d,e,f,g,h;g=this.items;h=[];for(e=0,f=g.length;e<f;e++){b=g[e];a=$(b);c=Math.round(a.css("opacity"));d=c>0?"visible":"hidden";h.push(a.css({opacity:c,visibility:d}))}return h};a.prototype.leftClick=function(a){if(this.pageIndex>0){this.rightArrow.removeClass("disabled");this.pageIndex--;if(this.pageIndex===0){this.leftArrow.addClass("disabled")}this.page()}return false};a.prototype.makeActive=function(a){return a.addClass("active").removeClass("non-active")};a.prototype.page=function(a){var b,c,d,e,f,g,h;a=a!=null?a:true;this.activeItems=$(".active",this.itemList);g=this.activeItems;for(c=0,e=g.length;c<e;c++){b=g[c];$(b).removeClass("active").addClass("non-active")}h=this.items.slice(this.pageIndex*this.numPerPage,this.numPerPage);for(d=0,f=h.length;d<f;d++){b=h[d];this.makeActive($(b))}if(a){return this.itemList.animate({"margin-left":this.pageIndex*this.numPerPage*this.itemWidth*-1},{duration:800,easing:"easeInOutExpo"})}};a.prototype.rightClick=function(a){if(this.pageIndex<this.numPages-1){this.leftArrow.removeClass("disabled");this.pageIndex++;if(this.pageIndex===this.numPages-1){this.rightArrow.addClass("disabled")}this.page()}return false};return a}();$(document).ready(function(){return new a})}).call(this);(function(){var a;var b=function(a,b){return function(){return a.apply(b,arguments)}};this.VideoPlayer=a=function(){function a(a,c,d,e,f){this.removeExperience=b(this.removeExperience,this);this.play=b(this.play,this);this.removeOnComplete=f||false;this.container=c;this.width=d;this.height=e;this.videoID=parseInt(a,10);this.init()}a.container;a.height;a.loaded;a.removeOnComplete;a.width;a.videoID;a.video;a.prototype.init=function(){var a,c,d,e,f;e="featurePlayer";this.player=brightcove.createElement("object");this.player.id=e;d={playerID:1176915209001,videoId:this.videoID,autoStart:true,bgcolor:"#000000",playerKey:"AQ~~,AAABEhAW7Ok~,pZ3uJSwMT2UJRwu4d-nA8Hk4WCNabx57",width:this.width,height:this.height,isVid:"true",isUI:"true",dynamicStreaming:"true",wmode:"opaque"};window.onTemplateLoaded=b(function(a){var c;this.experienceID=a;c=brightcove.getExperience(this.experienceID);this.video=c.getModule(APIModules.VIDEO_PLAYER);$(this.container).css("visibility","visible");$(this.video).bind("mediaBegin",b(function(){$(this.container).trigger("mediaStarted");return $(this.container).css("visibility","visible")},this));return $(this.video).bind("mediaComplete",b(function(){$(this.container).trigger("mediaComplete");if(this.removeOnComplete){return this.removeExperience()}},this))},this);c;f=[];for(a in d){c=brightcove.createElement("param");c.name=a;c.value=d[a];f.push(this.player.appendChild(c))}return f};a.prototype.createPlayer=function(){brightcove.createExperience(this.player,this.container,true);if($.browser.msie){return $(this.container).css("visibility","visible")}};a.prototype.play=function(){return this.createPlayer()};a.prototype.removeExperience=function(){return brightcove.removeExperience(this.experienceID)};return a}()}).call(this);(function(){var a;var b=function(a,b){return function(){return a.apply(b,arguments)}};a=function(){function i(){this.showVideo=b(this.showVideo,this);this.playVideo=b(this.playVideo,this);this.mediaStarted=b(this.mediaStarted,this);this.hideVideo=b(this.hideVideo,this);this.videoPlayer=new VideoPlayer(h,g[0],960,510,true);this.init()}var a,c,d,e,f,g,h;f=$(".home .feature.video");a=$(".content",f);c=$(".hit",f);d=$(".background img",f);e=$(".tick-btn, .play",f);g=$(".player",f);h=$(g).attr("data-video-id");i.videoPlayer;i.prototype.init=function(){f.click(b(function(a){a.preventDefault();return this.showVideo()},this));g.css({visibility:"hidden",display:"block"});g.bind("mediaStarted",this.mediaStarted);return g.bind("mediaComplete",this.hideVideo)};i.prototype.hideVideo=function(){g.css({visibility:"hidden"});a.css("visibility","visible");d.css("visibility","visible");c.css("display","block");a.animate({opacity:1},{easing:"easeOutQuad",duration:500});return d.animate({opacity:1},{easing:"easeOutQuad",duration:500})};i.prototype.mediaStarted=function(){c.removeClass("loading");return c.css("display","none")};i.prototype.playVideo=function(){a.css("visibility","hidden");d.css("visibility","hidden");g.css("display","block");c.addClass("loading");g.animate({opacity:1},{easing:"easeOutQuad",duration:500});return this.videoPlayer.play()};i.prototype.showVideo=function(){a.animate({opacity:0},{easing:"easeOutQuad",duration:500});return d.animate({opacity:0},{easing:"easeOutQuad",duration:500,complete:this.playVideo})};return i}();new a}).call(this)
