var idToIgnore=false;var guidedTourDelegate={trackingNameForSection:function(a,c,b){if(c==idToIgnore||c=="hero"){return false
}return c},changeToDimensions:function(b){var a=this.view.view.view();if(a){var c=a.getDimensions();
if(this.view.options.shouldAnimateContentChange){new Effect.Parallel([new Effect.Scale(a,((b.width/c.width)*100),{scaleY:false,scaleContent:false,sync:true}),new Effect.Scale(a,((b.height/c.height)*100),{scaleX:false,scaleContent:false,sync:true})],{duration:this.view.options.animationDuration})
}else{a.style.width=b.width+"px";a.style.height=b.height+"px"}}},didAppendContent:function(b){this.init(b);
var a=b.currentSection;if(a){this.changeToDimensions(a.content.getDimensions())
}},init:function(a){if(!this.view){this.view=a}this.setShare();if(!this.backLink){this.backLink=$$("#backtovideo .toggleshare")[0]
}},willShow:function(b,c,a){this.init(b);if(a&&a.id!="sharecontainer"){b.options.shouldAnimateContentChange=true
}if(c&&c.id=="sharecontainer"){b.options.shouldAnimateContentChange=true}if(a&&a.id=="sharecontainer"){try{console.log("yay")
}catch(d){}Share.toggleVideo({sharetoggles:[new Element("div"),new Element("div")]})
}},didShow:function(b,c,a){this.init(b);b.options.shouldAnimateContentChange=false;
if(a&&a.id!=="sharecontainer"){if(this.backLink){this.backLink.href="#"+a.id}}},setShare:function(a){var b=$$("#backtovideo .toggleshare")[0];
if(b.hasClassName("replay")){b.removeClassName("replay")}this.shareToggles=$$(".toggleshare");
this.shareToggles.each(function(c,d){c.observe("click",this.toggleShare.bind(this))
}.bind(this));this.setShare=function(){}},toggleShare:function(a){if(a){a.stop(a)
}var b=["one","two"];b.each(function(c,d){c=new Element("div");document.body.appendChild(c);
b[d]=c});Share.toggleVideo({sharetoggles:b});if(!!Share.shown){this.view.show(null,true);
new Effect.Appear("sharecontainer");this.view.options.shouldAnimateContentChange=true;
this.changeToDimensions($("sharecontainer").getDimensions());this.view.options.shouldAnimateContentChange=false
}else{new Effect.Fade("sharecontainer");this.view.show(this.view.sectionWithId(this.backLink.href.replace(/.*#/,"")))
}}};Event.onDOMReady(function(){if(AC.Detector.isMobile()){$("hero").addClassName("mobile")
}else{var d=$$(".section");d.unshift($("hero"));idToIgnore=d[0];var a=d[0].getHeight();
$("moviecontainer").style.height=a+"px";d[0].remove();var c=new AC.ViewMaster.Tracker("click");
c.setDelegate(guidedTourDelegate);var b=new AC.ViewMaster.Viewer(d,"moviecontainer","size",{initialId:"hero",animationDuration:0.4,alwaysShowSection:true,shouldAnimateContentChange:true});
b.setDelegate(guidedTourDelegate);b.didAppendContent(d[0])}});
