registerAnyNs("Pepper");Pepper={shareLink:null,navigation:null,isInitialRequest:true,ignoreHashChange:false,shareLinkTemplate:null,touchMove:{instance:null,position:{touch:0,scrollBar:0}},scrollBar:{instance:null,maxOffset:null,scrollContent:null,scrollContainer:null,documentMouseScroll:null},settings:{scroller:{distance:80,duration:0.3},animations:{navigation:{main:{intro:{fps:40,delay:0.3,duration:0.6},click:{fps:40,duration:0.4}},init:{delay:200,fadeDuration:0.4,increase:function(a){return a*1.2}}},page:{change:{fps:40,padding:20,duration:0.5,direction:"bottom"}},home:{fps:60,delay:1200,duration:1.4,divideByOnCancel:4},portfolio:{solutions:{fps:40,duration:0.4}}},clickBlocker:null}};registerAnyNs("Pepper",window);document.observe("dom:loaded",function(){Pepper.clickBlocker=$("click_blocker");var d=$$(".main_navigation.top")[0];var f=$$(".main_navigation.bottom")[0];Pepper.touchMove.instance=new Pepper.Touch.Move();var e=new Pepper.Navigation();var a=new Pepper.Navigation.Point.Configuration();a.set("default",{li:{top:"-30px",left:"0px"},a:{lineHeight:"101px",fontSize:"12px",paddingLeft:"66px",width:"364px"}});a.set("topFirst",{li:{top:"0px",left:"-67px"},a:{lineHeight:"58px",fontSize:"30px",paddingLeft:"134px",width:"298px"}});a.set("topSecond",{li:{top:"-30px",left:"-67px"},a:{lineHeight:"101px",fontSize:"12px",paddingLeft:"134px",width:"298px"}});a.set("bottomFirst",{li:{top:"-30px",left:"410px"},a:{lineHeight:"101px",fontSize:"12px",paddingLeft:"66px",width:"364px"}});a.set("bottomSecond",{li:{top:"-30px",left:"410px"},a:{lineHeight:"101px",fontSize:"12px",paddingLeft:"66px",width:"364px"}});a.set("bottomThird",{li:{top:"-30px",left:"410px"},a:{lineHeight:"101px",fontSize:"12px",paddingLeft:"66px",width:"364px"}});var c=new Pepper.Navigation.Point();c.setId("topFirst");c.setConfig(a);c.setElement(d.down(".first"));c.setDefaultStyle(c.getElement().getStyle("top"));var x=new anyLib.Url(c.getElement().down("a").href);c.setPath(x.getPath());var y=new Pepper.Navigation.Point.Configuration();y.set("default",{li:{top:"-30px",left:"309px"},a:{lineHeight:"101px",fontSize:"12px"}});y.set("topFirst",{li:{top:"-30px",left:"668px"},a:{lineHeight:"101px",fontSize:"12px"}});y.set("topSecond",{li:{top:"0px",left:"668px"},a:{lineHeight:"58px",fontSize:"30px"}});y.set("bottomFirst",{li:{top:"-30px",left:"668px"},a:{lineHeight:"101px",fontSize:"12px"}});y.set("bottomSecond",{li:{top:"-30px",left:"668px"},a:{lineHeight:"101px",fontSize:"12px"}});y.set("bottomThird",{li:{top:"-30px",left:"668px"},a:{lineHeight:"101px",fontSize:"12px"}});var n=new Pepper.Navigation.Point();n.setId("topSecond");n.setConfig(y);n.setElement(d.down(".second"));n.setDefaultStyle(n.getElement().getStyle("top"));var m=new anyLib.Url(n.getElement().down("a").href);n.setPath(m.getPath());var i=new Pepper.Navigation.Point.Configuration();i.set("default",{li:{top:"30px",left:"0px"},a:{lineHeight:"45px",fontSize:"12px",paddingLeft:"66px",width:"364px"}});i.set("topFirst",{li:{top:"30px",left:"170px"},a:{lineHeight:"45px",fontSize:"12px",paddingLeft:"66px",width:"364px"}});i.set("topSecond",{li:{top:"30px",left:"170px"},a:{lineHeight:"45px",fontSize:"12px",paddingLeft:"66px",width:"364px"}});i.set("bottomFirst",{li:{top:"0px",left:"-67px"},a:{lineHeight:"82px",fontSize:"30px",paddingLeft:"134px",width:"298px"}});i.set("bottomSecond",{li:{top:"30px",left:"170px"},a:{lineHeight:"45px",fontSize:"12px",paddingLeft:"66px",width:"364px"}});i.set("bottomThird",{li:{top:"30px",left:"170px"},a:{lineHeight:"45px",fontSize:"12px",paddingLeft:"66px",width:"364px"}});var v=new Pepper.Navigation.Point();v.setId("bottomFirst");v.setConfig(i);v.setElement(f.down(".first"));v.setDefaultStyle(v.getElement().getStyle("top"));var u=new anyLib.Url(v.getElement().down("a").href);v.setPath(u.getPath());var o=new Pepper.Navigation.Point.Configuration();o.set("default",{li:{top:"30px",left:"308px"},a:{lineHeight:"45px",fontSize:"12px"}});o.set("topFirst",{li:{top:"30px",left:"410px"},a:{lineHeight:"45px",fontSize:"12px"}});o.set("topSecond",{li:{top:"30px",left:"410px"},a:{lineHeight:"45px",fontSize:"12px"}});o.set("bottomFirst",{li:{top:"30px",left:"410px"},a:{lineHeight:"45px",fontSize:"12px"}});o.set("bottomSecond",{li:{top:"30px",left:"410px"},a:{lineHeight:"45px",fontSize:"12px"}});o.set("bottomThird",{li:{top:"30px",left:"410px"},a:{lineHeight:"45px",fontSize:"12px"}});var g=new Pepper.Navigation.Point();g.setId("bottomSecond");g.setConfig(o);g.setElement(f.down(".second"));g.setDefaultStyle(g.getElement().getStyle("top"));var s=new anyLib.Url(g.getElement().down("a").href);g.setPath(s.getPath());var z=new Pepper.Navigation.Point.Configuration();z.set("default",{li:{top:"30px",left:"598px"},a:{lineHeight:"45px",fontSize:"12px"}});z.set("topFirst",{li:{top:"30px",left:"650px"},a:{lineHeight:"45px",fontSize:"12px"}});z.set("topSecond",{li:{top:"30px",left:"650px"},a:{lineHeight:"45px",fontSize:"12px"}});z.set("bottomFirst",{li:{top:"30px",left:"650px"},a:{lineHeight:"45px",fontSize:"12px"}});z.set("bottomSecond",{li:{top:"30px",left:"650px"},a:{lineHeight:"45px",fontSize:"12px"}});z.set("bottomThird",{li:{top:"0px",left:"650px"},a:{lineHeight:"82px",fontSize:"30px"}});var l=new Pepper.Navigation.Point();l.setId("bottomThird");l.setConfig(z);l.setElement(f.down(".third"));l.setDefaultStyle(l.getElement().getStyle("top"));var h=new anyLib.Url(l.getElement().down("a").href);l.setPath(h.getPath());e.addPoint(c);e.addPoint(n);e.addPoint(v);e.addPoint(g);e.addPoint(l);var k=new anyLib.MVC.Controller.Dispatcher();var p=new Pepper.Controller.Default();k.setDefaultAction("default");p.getRegions().add("animation_container_tabs",new anyLib.MVC.View.Region("animation_container_tabs"));p.getRegions().add("animation_container_content",new anyLib.MVC.View.Region("animation_container_content"));p.getRegions().add("animation_container_sidebar",new anyLib.MVC.View.Region("animation_container_sidebar"));p.getRegions().add("animation_container_scroller",new anyLib.MVC.View.Region("animation_container_scroller"));p.getRegions().add("animation_container_home_page",new anyLib.MVC.View.Region("animation_container_home_page"));p.getRegions().add("animation_container_content_wide",new anyLib.MVC.View.Region("animation_container_content_wide"));p.getRegions().add("animation_container_content_full",new anyLib.MVC.View.Region("animation_container_content_full"));p.getRegions().add("animation_container_portfolio_overlay",new anyLib.MVC.View.Region("animation_container_portfolio_overlay"));p.preDispatch.add(function(){Pepper.clickBlocker.show()});p.postDispatch.add(function(A){_gaq.push(["_trackPageview",A.getRequest().getUrl()])});var t=new Pepper.DeepLinking();t.addFilter(new anyLib.DeepLinking.Filter.Contains("#"));t.addFilter(new anyLib.DeepLinking.Filter.Contains("mailto:"));t.addFilter(new anyLib.DeepLinking.Filter.ClassName("no-hash"));t.addFilter(new Pepper.DeepLinking.Filter.Attribute("target","_blank"));p.setDeepLinking(t);var b=function(B){var A=new anyLib.MVC.Request();A.setController(p);A.setUrl(B.getFullPath());k.dispatch(A);e.trigger(B)};t.onLinkTriggered.add(function(A){["sidebar_navigation","tab_navigation"].each(function(B){var C=A.getElement().up("#"+B);if(typeof(C)!="undefined"){if(C.down(".active")){C.down(".active").removeClassName("active")}A.getElement().up(0).addClassName("active")}});if(A.getElement().hasClassName("ignore-trigger")){Pepper.ignoreHashChange=true;return}b(A.getUrl().getPath())});Pepper.Event.onHashChange.getInstance().add(function(){if(Pepper.ignoreHashChange===true){Pepper.ignoreHashChange=false;return}if(Pepper.clickBlocker.visible()){return}var B=new anyLib.Url(window.location.toString());var A=B.getPath().getFullPath();if(B.getHash()!=""){A=B.getHash().substr(1)}b(new anyLib.Url.Path(A))});var w=new anyLib.Url(window.location.toString());var q=w.getPath();if(w.getHash()!=""){q=new anyLib.Url.Path(w.getHash().substr(1))}var j=new Pepper.ScriptedAnimation.Navigation();j.animationComplete.add(function(){Pepper.shareLink=$("share_this_page");Pepper.shareLinkTemplate=new Template("#{protocol}://#{host}#{path}#{hash}");t.updateLinks();Pepper.clickBlocker.hide()});j.navigation=e;if(q.getPath().getCount()==1){var r=new Pepper.ScriptedAnimation.Home();r.animationComplete.add(function(){j.start()});r.start()}else{j.animationComplete.add(function(){b(q)});j.start()}Pepper.navigation=e});registerAnyNs("Pepper",window);Pepper.Event={};Pepper.Event.onHashChange=(function(){var a=null;return{getInstance:function(){if(a==null){a=new anyLib.Event.Collection();if(typeof(window.hashchange)=="undefined"){var b=window.location.hash;setInterval(function(){var c=window.location.hash;if(b==c){return}b=c;a.fire(c)},100)}else{Event.on(window,"hashchange",function(c){a.fire(window.location.hash)})}}return a}}})();registerAnyNs("Pepper",window);Pepper.Accordion=Class.create(anyLib.Paging,{});registerAnyNs("Pepper");Pepper.Scroller=Class.create({initialize:function(b,a,c){if(b){this.setElement(b)}if(a){this.setContainer(a)}if(c){this.setContent(c)}},getElement:function(){if(typeof(this._element)=="undefined"){this.setElement(null)}return this._element},setElement:function(a){this._element=a;this.getElement().down(".arrow.up").on("click",this._up.bind(this));this.getElement().down(".arrow.down").on("click",this._down.bind(this));return this},getContainer:function(){if(typeof(this._container)=="undefined"){this.setContainer(null)}return this._container},setContainer:function(a){this._container=a;return this},getContent:function(){if(typeof(this._content)=="undefined"){this.setContent(null)}return this._content},setContent:function(a){this._content=a;return this},getScrollDistance:function(){if(typeof(this._distance)=="undefined"){this.setScrollDistance(24)}return this._distance},setScrollDistance:function(a){this._distance=a;return this},getDuration:function(){if(typeof(this._duration)=="undefined"){this.setDuration(0.2)}return this._duration},setDuration:function(a){this._duration=a;return this},_getAnimation:function(){if(typeof(this._animation)=="undefined"){this._setAnimation(null)}return this._animation},_setAnimation:function(a){this._animation=a;return this},_down:function(){var c=-(this.getContent().measure("height")-this.getContainer().measure("height"));var b=this.getContent().measure("top");var a=b-this.getScrollDistance();if(a<=c){a=c}this._animate({top:a+"px"})},_up:function(){var a=this.getContent().measure("top");if(a==0){return}move=a+this.getScrollDistance();if(move>0){move=0}this._animate({top:move+"px"})},_animate:function(a){if(this._getAnimation()!=null){this._getAnimation().cancel();this._setAnimation(null)}this._setAnimation(new Effect.Morph(this.getContent(),{style:a,duration:this.getDuration()}))}});registerAnyNs("Pepper",window);Pepper.Portfolio={};registerAnyNs("Pepper",window);Pepper.ScriptedAnimation=Class.create({initialize:function(){this.animationComplete=new anyLib.Event.Collection()},start:function(){}});registerAnyNs("Pepper");Pepper.Navigation=Class.create({initialize:function(){},getPoints:function(){if(typeof(this._points)=="undefined"){this._setPoints(new anyLib.Collection.List())}return this._points},_setPoints:function(a){this._points=a;return this},addPoint:function(a){this.getPoints().add(a);return this},getCurrent:function(){if(typeof(this._current)=="undefined"){this._setCurrent(null)}return this._current},_setCurrent:function(a){this._current=a;return this},trigger:function(d){var a=null;if(Object.isString(d)){d=new anyLib.Url.Path(d)}try{var c=d.getToLevel(2);this.getPoints().getAll().each(function(e){if(a!=null){return}if(e.getPath().getToLevel(2)==c){a=e.getId()}})}catch(b){}this.getPoints().getAll().each(function(e){e.morphTo(a)})}});registerAnyNs("Pepper",window);Pepper.Lightbox=Class.create(anyLib.UI.Lightbox,{getTranslations:function(){return this.getLayout().getTranslations()},setTranslations:function(a){return this.getLayout().setTranslations(a)},_cancelAnimation:function(a){if(!this.animations.hasKey(a)){return}if(this.animations.getValue(a)==null){return}this.animations.get(a).cancel()},_getDimensions:function(){return document.viewport.getDimensions()},_updateControls:function(){var b=true;var a=true;if(this.getContents().isLastKey(this.getCurrent().getKey())){b=false}if(this.getContents().isFirstKey(this.getCurrent().getKey())){a=false}if(!this.getLayout().nextTrigger.getElement().visible()&&b===true){this.getLayout().nextTrigger.getElement().appear({duration:0.2})}if(b===false){this.getLayout().nextTrigger.getElement().fade({duration:0.2})}if(!this.getLayout().prevTrigger.getElement().visible()&&a===true){this.getLayout().prevTrigger.getElement().appear({duration:0.2})}if(a===false){this.getLayout().prevTrigger.getElement().fade({duration:0.2})}},initialize:function($super){$super();this.animations=new anyLib.Collection.KeyValue()},_insertContent:function(){this._cancelAnimation("content");this.animations.set("content",new Effect.Fade(this.getLayout().getContent(),{duration:0.3,afterFinish:function(){this.getLayout().getContent().innerHTML=this.getCurrent().toString();this.animations.set("content",new Effect.Appear(this.getLayout().getContent(),{duration:0.4}))}.bind(this)}))},open:function(a){this.beforeOpen.fire(this);this.getLayout().getContent().innerHTML="";this.getLayout().prevTrigger.getElement().hide();this.getLayout().nextTrigger.getElement().hide();this._cancelAnimation("content_visibility");this._cancelAnimation("background_visibility");this.onOpen.fire(this);this.getLayout().getContent().innerHTML="";this.animations.set("background_visibility",new Effect.Appear(this.getLayout().getBackground(),{to:0.7,duration:0.3,afterFinish:function(){this.animations.set("content_visibility",new Effect.Appear(this.getLayout().getContainer(),{duration:0.3,afterFinish:function(){this.afterOpen.fire(this);this.change(a)}.bind(this)}))}.bind(this)}))},close:function(){this.beforeClose.fire(this);this._cancelAnimation("content_visibility");this._cancelAnimation("background_visibility");this.onClose.fire(this);this.animations.set("content",new Effect.Fade(this.getLayout().getContent(),{duration:0.3,afterFinish:function(){this.getLayout().getContent().innerHTML="";this.animations.set("content_visibility",new Effect.Fade(this.getLayout().getContainer(),{duration:0.4}));this.animations.set("background_visibility",new Effect.Fade(this.getLayout().getBackground(),{delay:0.4,duration:0.3,afterFinish:function(){this.afterClose.fire(this);this.getLayout().getContent().innerHTML=""}.bind(this)}))}.bind(this)}))}});registerAnyNs("Pepper");Pepper.DeepLinking=Class.create(anyLib.DeepLinking,{updateLink:function(a){var b=new anyLib.Url.DeepLink(a);b.getUrl().setHash(b.getUrl().getPath().getFullPath());b.getUrl().getPath();if(a.hasClassName("object")){b.setType("object")}if(a.hasClassName("document")){b.setType("document")}a.href="#"+b.getUrl().getHash();a.on(this._getTriggerEvent(),function(){if(this.getCurrent()==b){return}this.onLinkTriggered.fire(b);this.setCurrent(b)}.bind(this))}});registerAnyNs("Pepper",window);Pepper.Paging=Class.create(anyLib.Paging,{setPage:function(a){if(this.getCurrent()==a){return}if(this.getCurrent()!=null){this.getContents().getValue(this.getCurrent()).hide()}this.setCurrent(a);this.getContents().getValue(this.getCurrent()).show()}});registerAnyNs("Pepper.Navigation");Pepper.Navigation.Point=Class.create({initialize:function(){this._setAnimations(new anyLib.Collection.KeyValue())},getId:function(){if(typeof(this._id)=="undefined"){this.setId(null)}return this._id},setId:function(a){this._id=a;return this},getPath:function(){if(typeof(this._path)=="undefined"){this.setPath(null)}return this._path},setPath:function(a){if(Object.isString(a)){a=new anyLib.Url.Path(a)}this._path=a;return this},getDefaultStyle:function(){if(typeof(this._defaultStyle)=="undefined"){this.setDefaultStyle({})}return this._defaultStyle},setDefaultStyle:function(a){this._defaultStyle=a;return this},getElement:function(){if(typeof(this._element)=="undefined"){this.setElement(null)}return this._element},setElement:function(a){this._element=a;return this},getConfig:function(){if(typeof(this._config)=="undefined"){this.setConfig(null)}return this._config},setConfig:function(a){this._config=a;return this},_getAnimations:function(){if(typeof(this._animations)=="undefined"){this._setAnimations(null)}return this._animations},_setAnimations:function(a){this._animations=a},_getCurrentConfiguration:function(){if(typeof(this._currentConfiguration)=="undefined"){this._setCurrentConfiguration(null)}return this._currentConfiguration},_setCurrentConfiguration:function(a){this._currentConfiguration=a;return this},morphTo:function(a){if(this._getCurrentConfiguration()==a){return}this._setCurrentConfiguration(a);if(this.getId()==a){this.getElement().addClassName("active")}else{this.getElement().removeClassName("active")}if(this._getAnimations().hasKey("li")&&this._getAnimations().get("li")!=null){this._getAnimations().get("li").cancel()}this._getAnimations().set("li",new Effect.Morph(this.getElement(),{style:this.getConfig().get(a).li,fps:Pepper.settings.animations.navigation.main.click.fps,duration:Pepper.settings.animations.navigation.main.click.duration,afterFinish:function(){this._getAnimations().removeKey("li")}.bind(this)}));if(this._getAnimations().hasKey("a")&&this._getAnimations().get("a")!=null){this._getAnimations().get("a").cancel()}this._getAnimations().set("a",new Effect.Morph(this.getElement().down("a"),{fps:Pepper.settings.animations.navigation.main.click.fps,duration:Pepper.settings.animations.navigation.main.click.duration,style:this.getConfig().get(a).a,afterFinish:function(){this._getAnimations().removeKey("a")}.bind(this)}))}});registerAnyNs("Pepper.Navigation.Point");Pepper.Navigation.Point.Configuration=Class.create({getConfigs:function(){if(typeof(this._configs)=="undefined"){this._setConfigs(new anyLib.Collection.KeyValue())}return this._configs},_setConfigs:function(a){this._configs=a},get:function(a){if(this.getConfigs().hasKey(a)){return this.getConfigs().get(a)}return this.getConfigs().get("default")},set:function(a,b){this.getConfigs().set(a,b)}});registerAnyNs("Pepper.Views",window);Pepper.Views.Default=Class.create(anyLib.MVC.View,{render:function(){this.beforeRender.fire(this);this.renderRegions(function(){this.deepLinking.updateLinks();if(this.contentScrolls){this.attachScrollBar()}this.renderExtras();this.afterRender.fire(this)}.bind(this));Pepper.isInitialRequest=false},renderExtras:function(){},attachScrollBar:function(){if(Pepper.scrollBar.instance!=null){Pepper.scrollBar.instance=null;Pepper.touchMove.instance.setActive(false)}if(Pepper.scrollBar.documentMouseScroll!=null){Pepper.scrollBar.documentMouseScroll.stop()}Pepper.scrollBar.scrollContainer=this.regions.get("animation_container_content").getElement();Pepper.scrollBar.scrollContent=this.regions.get("animation_container_content").getElement().down(0);var b=this.regions.get("animation_container_scroller").getElement().down(".handle");var e=this.regions.get("animation_container_scroller").getElement().down(".handle_container");var c=this.regions.get("animation_container_content").getElement().select(".scroller_override");var a=this.regions.get("animation_container_content").getElement().select(".scroller_handle_container_override");Pepper.scrollBar.instance=new anyLib.UI.ScrollBar.Vertical(e,b);Pepper.scrollBar.maxOffset=Pepper.scrollBar.scrollContent.measure("height")-Pepper.scrollBar.scrollContainer.measure("height");var d=function(h){var f=Pepper.scrollBar.scrollContent.measure("height")-Pepper.scrollBar.scrollContainer.measure("height");var g=Math.ceil(h.getValue());Pepper.scrollBar.scrollContent.setStyle({top:"-"+((f/100)*g)+"px"})};Pepper.scrollBar.instance.onJump.add(d);Pepper.scrollBar.instance.onScroll.add(d);if(c.length>0){c=c.first();Pepper.scrollBar.scrollContainer=c;Pepper.scrollBar.scrollContent=c.down(0)}if(a.length>0){a=a.first();e=a;b=a.down(".handle");Pepper.scrollBar.instance.setContainer(e);Pepper.scrollBar.instance.setHandle(b)}Pepper.touchMove.instance.setActive(true);if(Pepper.scrollBar.documentMouseScroll!=null){Pepper.scrollBar.documentMouseScroll.start()}else{Pepper.scrollBar.documentMouseScroll=document.on(anyLib.Event.getMouseScrollEvent(),function(g){var i=Pepper.scrollBar.instance.getValue();var h=Pepper.scrollBar.scrollContainer.measure("height");var f=Pepper.scrollBar.scrollContent.measure("height");var j=Math.ceil(f/h);if(j<1){j=1}j=8/j;if(anyLib.Event.getMouseScrollDirection(g)=="up"){i=i-(5*j);if(i<0){i=0}}else{i=i+(5*j);if(i>100){i=100}}Pepper.scrollBar.instance.setToValue(i);Event.stop(g)});Pepper.touchMove.instance.onTouchStart.add(function(){Pepper.touchMove.position.touch=Pepper.touchMove.instance.getPosition().top;Pepper.touchMove.position.scrollBar=parseInt(Pepper.scrollBar.scrollContent.getStyle("top").gsub("px",""))});Pepper.touchMove.instance.onTouchMove.add(function(){if(!Event.findElement(Pepper.touchMove.instance.getEvent()).descendantOf(Pepper.scrollBar.scrollContainer)){return}var g=(Pepper.touchMove.position.touch-Pepper.touchMove.instance.getPosition().top)-Pepper.touchMove.position.scrollBar;var f=Pepper.scrollBar.scrollContent.measure("height")-Pepper.scrollBar.scrollContainer.measure("height");if(g>f){g=f}if(g<0){g=0}Pepper.scrollBar.instance.setToValue((100/f)*g)})}},attachLightbox:function(){var b=$("light_box_translations");if(b){lightBox=new Pepper.Lightbox();lightBoxLayout=new Pepper.Lightbox.Layout();lightBox.setLayout(lightBoxLayout);var a=b.innerHTML.evalJSON();Object.keys(a).each(function(d){lightBox.getTranslations().set(d,a[d])});var c=$$(".detail_thumbnails .light_box_information");c.each(function(f,e){var g=null;if(f.hasClassName("image")){g=new Pepper.Lightbox.Content.Image();g.setKey("image_"+e)}else{g=new Pepper.Lightbox.Content.YouTube();g.setKey("video_"+e)}g.setContent(f.down(".light_box_content").innerHTML);g.setHeadline(f.down(".light_box_title").innerHTML);g.setDescription(f.down(".light_box_description").innerHTML);var h=f.up(".light_box_trigger");if(typeof(h)!="undefined"){var d=new anyLib.Event.Trigger.Click();d.setElement(h);d.setContent(g);d.onTrigger.add(function(i){lightBox.change(i.getKey())})}lightBox.addContent(g)})}},renderRegions:function(f){var c=new Element("div");c.innerHTML=this.responseText;this.beforeRender.fire(this);var h=[];var a=1;var e="top";var b="height";switch(this.animationDirection){case"top":a=-1;e="top";b="height";break;case"right":e="left";b="width";break;case"left":a=-1;e="left";b="width";break;default:e="top";b="height"}var i={};var d={};var g={};Object.values(this.regions.getAll()).each(function(n){n.parseHTML(c);var l=n.getElement().measure(b)+Pepper.settings.animations.page.change.padding;d[e]="0px";i[e]=-l*a+"px";g[e]=l*a+"px";var m=false;var j=false;if(n.getElement().childElements().length>0){m=n.getElement().childElements().first()}if(m&&n.getContent()){var o=m.innerHTML.toString().strip().gsub('href="#/','href="/');var k=n.getContent().innerHTML.toString().strip();if(o==k){return}}if(m){m.setStyle({overflow:"hidden",height:l+"px"});animation=new Effect.Morph(m,{sync:true,style:i,afterFinish:function(){m.remove();if(!j){n.getElement().hide()}}});h.push(animation)}if(!n.getContent()){return}n.getContent().setStyle(g);n.getElement().insert({bottom:n.getContent()});j=n.getElement().childElements().last();if(j){if(!n.getElement().visible()){n.getElement().show()}animation=new Effect.Morph(j,{sync:true,style:d});h.push(animation)}});new Effect.Parallel(h,{fps:Pepper.settings.animations.page.change.fps,duration:Pepper.settings.animations.page.change.duration,afterFinish:function(){var l=c.down("#page_title");if(l){var m=l.innerHTML;document.title=m;var k=Pepper.shareLink.href.toString();k=k.substr(0,k.indexOf("body=")+5);var j=new anyLib.Url(window.location.toString());j.setPath(j.getPath().getToLevel(1));Pepper.shareLink.href=k+m.gsub(" ","%20")+"%0A%0A"+j.getParsed(Pepper.shareLinkTemplate)}if(typeof(f)=="function"){f()}}.bind(this)});return this}});registerAnyNs("Pepper.Views.Default",window);Pepper.Views.Default.Career=Class.create(Pepper.Views.Default,{renderExtras:function(){}});registerAnyNs("Pepper.Views.Default",window);Pepper.Views.Default.Reference=Class.create(Pepper.Views.Default,{renderExtras:function(){this.attachLightbox();$$(".accordion").each(function(b){var a=new Pepper.Accordion();b.select(".item").each(function(d,f){var c=f+1;var e=new anyLib.Event.Trigger.Click(d.down(".accordion_trigger"),c);e.onTrigger.add(function(j){a.setPage(j)}.bind(this));var h=new Pepper.Accordion.Page(e,d.down(".accordion_content"));h.setContainer(d);h.afterShow.add(function(){var j=h.getContainer().down(".scroll_container");var k=h.getContainer().down(".handle_container");if(typeof(k)!="undefined"){j.addClassName("scroller_override");k.addClassName("scroller_handle_container_override");this.attachScrollBar()}}.bind(this));h.beforeHide.add(function(){var j=h.getContainer().down(".scroll_container");var k=h.getContainer().down(".handle_container");if(typeof(k)!="undefined"){Pepper.scrollBar.instance.setToValue(0);j.removeClassName("scroller_override");k.removeClassName("scroller_handle_container_override")}});a.addPage(c,h);if(f==0){h.setActive(true);var g=h.getContainer().down(".scroll_container");var i=h.getContainer().down(".handle_container");if(typeof(i)!="undefined"){g.addClassName("scroller_override");i.addClassName("scroller_handle_container_override");this.attachScrollBar()}}}.bind(this))}.bind(this))}});registerAnyNs("Pepper.Views.Default",window);Pepper.Views.Default.Portfolio=Class.create(Pepper.Views.Default,{renderExtras:function(){var b=$("portfolio_challenges");if(b){var e=b.select(".item-trigger");var g=b.select(".item-content");var f=null;var c=new Pepper.Paging();e.each(function(j,l){var i=l+1;var k=new anyLib.Event.Trigger.Click(j,i);k.onTrigger.add(function(n){if(c.getCurrent()==n){if(c.getCurrent()!=null){c.getContents().get(c.getCurrent()).hide()}c.setCurrent(null);return}c.setPage(n)});var m=new Pepper.Paging.Page(k,g[l]);m.afterShow.add(function(){var p=c.getContents().get(c.getCurrent()).getTrigger().getElement().positionedOffset();var n=Pepper.scrollBar.scrollContent.measure("height")-Pepper.scrollBar.scrollContainer.measure("height");var o=(100/n)*p.top;Pepper.scrollBar.instance.setToValue(o)});c.addPage(i,m);if(j.hasClassName("open")){f=i;m.setActive(true)}});c.setCurrent(f);if(f!=null){var h=c.getContents().get(c.getCurrent());h.afterShow.fire(h)}}var d=$("portfolio_solutions");if(d){var a=new Pepper.Portfolio.Solutions();a.setSmallWidth(75);a.setLargeWidth(200);a.setDefaultWidth(100);d.select(".folder").each(function(j,i){a.addSolution(new Pepper.Portfolio.Solutions.Solution(j,"solution_"+i))}.bind(this))}}});registerAnyNs("Pepper.Views.Default",window);Pepper.Views.Default.Home=Class.create(Pepper.Views.Default,{renderExtras:function(){if(Pepper.isInitialRequest===true){Pepper.isInitialRequest=false;return}var a=Pepper.navigation.getPoints().getAll();Object.keys(a).each(function(c){a[c].getElement().setStyle({top:a[c].getDefaultStyle()})});var b=new Pepper.ScriptedAnimation.Navigation();b.navigation=Pepper.navigation;setTimeout(function(){Pepper.clickBlocker.show();b.start()},100);b.animationComplete.add(function(){this.deepLinking.updateLinks();Pepper.clickBlocker.hide()}.bind(this))}});registerAnyNs("Pepper.Views.Default",window);Pepper.Views.Default.News=Class.create(Pepper.Views.Default,{renderExtras:function(){this.attachLightbox()}});registerAnyNs("Pepper.Views.Default",window);Pepper.Views.Default.Error=Class.create(Pepper.Views.Default,{renderExtras:function(){}});registerAnyNs("Pepper.Views.Default",window);Pepper.Views.Default.Newsletter=Class.create(Pepper.Views.Default,{render:function($super){if(Pepper.isInitialRequest===true&&$("newsletter_form_submitted")){Pepper.isInitialRequest=false;this.deepLinking.updateLinks();if(this.contentScrolls){this.attachScrollBar()}this.renderExtras();this.afterRender.fire(this);return}$super()},renderExtras:function(){}});registerAnyNs("Pepper.Views.Default",window);Pepper.Views.Default.Default=Class.create(Pepper.Views.Default,{renderExtras:function(){}});registerAnyNs("Pepper.Views.Default",window);Pepper.Views.Default.Download=Class.create(Pepper.Views.Default,{renderExtras:function(){var a=$("download_form");var c=a.down(".allSubs");var b=a.select(".chk.sub");b.each(function(d){d.on("change",function(){c.checked=false})});if(c){c.on("change",function(){b.each(function(d){d.checked=c.checked})})}a.on("submit",function(f){Event.stop(f);var g=true;a.select(".chk").each(function(h){if(!g){return}if(h.checked){g=false}});if(!g){var e=new anyLib.Url(a.action);e.setQueryString(a.serialize());e.setHost(window.location.host);var d=window.open(e.getParsed(),null,"width=200,height=200,status=0,location=0,toolbar=0")}})}});registerAnyNs("Pepper.Paging",window);Pepper.Paging.Page=Class.create(anyLib.Paging.Page,{initialize:function($super,a,b){$super(a,b);this.afterShow=new anyLib.Event.Collection();this.afterHide=new anyLib.Event.Collection();this.beforeShow=new anyLib.Event.Collection();this.beforeHide=new anyLib.Event.Collection()},getAnimation:function(){if(typeof(this._animation)=="undefined"){this.setAnimation(null)}return this._animation},setAnimation:function(a){this._animation=a;return this},getActive:function(){if(typeof(this._active)=="undefined"){this.setActive(false)}return this._active},setActive:function(a){this._active=a;return this},show:function(){if(this.getActive()===true){return this}if(this.getAnimation()!=null){this.getAnimation().cancel();this.setAnimation(null)}this.getTrigger().getElement().addClassName("open");this.beforeShow.fire(this);this.setAnimation(new Effect.BlindDown(this.getElement(),{duration:0.3,afterFinish:function(){this.afterShow.fire(this);this.getAnimation().cancel();this.setAnimation(null);this.setActive(true)}.bind(this)}))},hide:function(){if(this.getActive()===false){return this}if(this.getAnimation()!=null){this.getAnimation().cancel();this.setAnimation(null)}this.getTrigger().getElement().removeClassName("open");this.beforeHide.fire(this);this.setAnimation(new Effect.BlindUp(this.getElement(),{duration:0.3,afterFinish:function(){this.afterHide.fire(this);this.getAnimation().cancel();this.setAnimation(null);this.setActive(false)}.bind(this)}))}});registerAnyNs("Pepper.ScriptedAnimation",window);Pepper.ScriptedAnimation.Navigation=Class.create(Pepper.ScriptedAnimation,{initialize:function($super){$super();this.metaNavs=$$("ul.meta");this.navigation=null},start:function(){var b=0;var a=Pepper.settings.animations.navigation.init.delay;this.navigation.getPoints().getAll().each(function(c){setTimeout(function(){c.morphTo("default")},a*Pepper.settings.animations.navigation.init.increase(b));b++});setTimeout(function(){var c=[];this.metaNavs.each(function(d){c.push(new Effect.Appear(d,{sync:true}))});new Effect.Parallel(c,{duration:Pepper.settings.animations.navigation.init.fadeDuration,afterFinish:function(){this.animationComplete.fire(this)}.bind(this)})}.bind(this),a*Pepper.settings.animations.navigation.init.increase(b))},end:function(){this.animationComplete.fire(this)}});registerAnyNs("Pepper.ScriptedAnimation",window);Pepper.ScriptedAnimation.Home=Class.create(Pepper.ScriptedAnimation,{initialize:function($super){$super();this.timeout=null;this.element=$("animation_container_home_page");this.delay=Pepper.settings.animations.home.delay;this.duration=Pepper.settings.animations.home.duration;this.clickBlocker=Pepper.clickBlocker.on("click",this.cancel.bind(this))},_reset:function(){this.element.down(".tube.left").setStyle({top:"72px",left:"-960px"});this.element.down(".tube.right").setStyle({bottom:"96px",right:"-960px"});this.element.down(".tube.left").show();this.element.down(".tube.right").show()},start:function(){this._reset();this._partOne()},cancel:function(){if(this.timeout!=null){this._partThree()}this.clickBlocker.stop();this.delay=Pepper.settings.animations.home.delay/Pepper.settings.animations.home.divideByOnCancel;this.duration=Pepper.settings.animations.home.duration/Pepper.settings.animations.home.divideByOnCancel},_partOne:function(){new Effect.Parallel([new Effect.Morph(this.element.down(".tube.left"),{sync:true,style:{left:"-352px"}}),new Effect.Morph(this.element.down(".tube.right"),{sync:true,style:{right:"-367px"}})],{duration:this.duration,afterFinish:this._partTwo.bind(this),fps:Pepper.settings.animations.home.fps})},_partTwo:function(){new Effect.Appear(this.element.down(".claim"),{to:1,duration:this.duration,fps:Pepper.settings.animations.home.fps,afterFinish:function(){this.timeout=setTimeout(this._partThree.bind(this),this.delay)}.bind(this)})},_partThree:function(){new Effect.Fade(this.element.down(".claim"),{to:0,duration:this.duration,afterFinish:this._partFour.bind(this),fps:Pepper.settings.animations.home.fps})},_partFour:function(){new Effect.Parallel([new Effect.Morph(this.element.down(".tube.left"),{sync:true,style:{left:"-481px"}}),new Effect.Morph(this.element.down(".tube.right"),{sync:true,style:{right:"-490px"}})],{duration:this.duration,afterFinish:this._partFive.bind(this),fps:Pepper.settings.animations.home.fps})},_partFive:function(){new Effect.Parallel([new Effect.Morph(this.element.down(".tube.left"),{sync:true,style:{top:"-251px"}}),new Effect.Morph(this.element.down(".tube.right"),{sync:true,style:{bottom:"-251px"}})],{duration:this.duration,afterFinish:this._partSix.bind(this),fps:Pepper.settings.animations.home.fps})},_partSix:function(){this.element.down(".tube.left").hide();this.element.down(".tube.right").hide();this.animationComplete.fire(this)}});registerAnyNs("Pepper.Touch.Move",window);Pepper.Touch.Move=Class.create({initialize:function(){this.onTouchEnd=new anyLib.Event.Collection();this.onTouchMove=new anyLib.Event.Collection();this.onTouchStart=new anyLib.Event.Collection();document.on("touchend",this._stop.bind(this));document.on("touchstart",this._start.bind(this))},getMoveHandle:function(){if(typeof(this._moveHandle)=="undefined"){this.setMoveHandle(document.on("touchmove",this._move.bind(this)))}return this._moveHandle},setMoveHandle:function(a){this._moveHandle=a;return this},getPosition:function(){if(typeof(this._position)=="undefined"){this.setPosition([0,0])}return this._position},setPosition:function(a){this._position=a;return this},getEvent:function(){if(typeof(this._event)=="undefined"){this.setEvent(null)}return this._event},setEvent:function(a){this._event=a;return this},getActive:function(){if(typeof(this._active)=="undefined"){this.setActive(false)}return this._active},setActive:function(a){this._active=a;return this},_start:function(a){if(this.getActive()===true){this.setEvent(a);this.setPosition(anyLib.Event.getPosition(a));this.onTouchStart.fire(this)}this.getMoveHandle().start()},_stop:function(a){this.getMoveHandle().stop();this.setEvent(a);this.onTouchEnd.fire(this)},_move:function(a){Event.stop(a);if(this.getActive()===false){return}this.setEvent(a);this.setPosition(anyLib.Event.getPosition(a));this.onTouchMove.fire(this)}});registerAnyNs("Pepper.Accordion",window);Pepper.Accordion.Page=Class.create(anyLib.Paging.Page,{initialize:function($super,a,b){$super(a,b);this.afterShow=new anyLib.Event.Collection();this.afterHide=new anyLib.Event.Collection();this.beforeShow=new anyLib.Event.Collection();this.beforeHide=new anyLib.Event.Collection()},getAnimation:function(){if(typeof(this._animation)=="undefined"){this.setAnimation(null)}return this._animation},setAnimation:function(a){this._animation=a;return this},getActive:function(){if(typeof(this._active)=="undefined"){this.setActive(false)}return this._active},setActive:function(a){this._active=a;return this},getContainer:function(){if(typeof(this._container)=="undefined"){this.setContainer(null)}return this._container},setContainer:function(a){this._container=a;return this},show:function(){if(this.getActive()===true){return this}if(this.getAnimation()!=null){this.getAnimation().cancel();this.setAnimation(null)}this.getContainer().addClassName("active");this.beforeShow.fire(this);this.setAnimation(new Effect.BlindDown(this.getElement(),{duration:0.3,afterFinish:function(){this.afterShow.fire(this);this.getAnimation().cancel();this.setAnimation(null);this.setActive(true)}.bind(this)}))},hide:function(){if(this.getActive()===false){return this}if(this.getAnimation()!=null){this.getAnimation().cancel();this.setAnimation(null)}this.getContainer().removeClassName("active");this.beforeHide.fire(this);this.setAnimation(new Effect.BlindUp(this.getElement(),{duration:0.3,afterFinish:function(){this.afterHide.fire(this);this.getAnimation().cancel();this.setAnimation(null);this.setActive(false)}.bind(this)}))}});registerAnyNs("Pepper.Controller",window);Pepper.Controller.Default=Class.create(anyLib.MVC.Controller.Action,{init:function(){this.setActionNamespace(Pepper.Views.Default);this.postDispatch.add(this.onPostDispatch.bind(this));this.requestError.add(function(){var a=new anyLib.Url(window.location.toString());this.getRequest().setUrl(a.getPath().getToLevel(1)+"/error");this.getRequest().setAction("error");this.dispatch("error")}.bind(this))},dispatch:function(a){this.preDispatch.fire(this);if(!this.getRequest().getParameters().hasKey("asynchronous")){this.getRequest().getParameters().add("asynchronous",true)}if(Ajax.activeRequestCount>0&&this.getAsynchronousRequest()!=null){try{this.getAsynchronousRequest().options.onSuccess=Prototype.emptyFunction();this.getAsynchronousRequest().options.onFailure=Prototype.emptyFunction()}catch(b){}this.setAsynchronousRequest(null)}this.setAsynchronousRequest(new Ajax.Request(this.getRequest().getUrl(),{method:"post",parameters:this.getRequest().getParameters().getAll(),onSuccess:function(c){this.setResponse(c);this.requestSuccess.fire(this);this.postDispatch.fire(this);if(this.getRequest().getAction()!=null&&a!=this.getRequest().getAction()){a=this.getRequest().getAction()}this._callAction(a);this.setAsynchronousRequest(null)}.bind(this),onFailure:function(c){this.setResponse(c);this.requestError.fire(this);this.postDispatch.fire(this);this.setAsynchronousRequest(null)}.bind(this)}))},onPostDispatch:function(){this.getRequest().setAction(this.getResponse().getResponseHeader("jsView"))},getAsynchronousRequest:function(){if(typeof(this._asynchronousRequest)=="undefined"){this.setAsynchronousRequest(null)}return this._asynchronousRequest},setAsynchronousRequest:function(a){this._asynchronousRequest=a;return this},getDeepLinking:function(){if(typeof(this._deepLinking)=="undefined"){this.setDeepLinking(new anyLib.DeepLinking())}return this._deepLinking},setDeepLinking:function(a){this._deepLinking=a;return this},getAnimationDirection:function(){var a=this.getResponse().getResponseHeader("animationStart");if(!a){a="bottom"}if(this.getDeepLinking().getCurrent()!=null){var c=this.getDeepLinking().getCurrent().getElement();var b=a;if(c.hasClassName("prev")||c.hasClassName("left")){b="left"}if(c.hasClassName("next")||c.hasClassName("right")){b="right"}if(c.hasClassName("up")){b="bottom"}if(c.hasClassName("down")){b="top"}if(c.hasClassName("prev")&&c.hasClassName("next")){b=a}a=b}Pepper.settings.animations.page.change.direction=a;return a},newsAction:function(){this.defaultAction()},homeAction:function(){this.defaultAction()},indexAction:function(){this.defaultAction()},errorAction:function(){this.defaultAction()},careerAction:function(){this.defaultAction()},downloadAction:function(){this.defaultAction()},portfolioAction:function(){this.defaultAction()},referenceAction:function(){this.defaultAction()},newsletterAction:function(){this.defaultAction()},defaultAction:function(){this.getView().regions=this.getRegions();this.getView().deepLinking=this.getDeepLinking();this.getView().responseText=this.getResponse().responseText;this.getView().animationDirection=this.getAnimationDirection();this.getView().contentScrolls=this.getResponse().getResponseHeader("contentScrolls");this.getView().afterRender.add(function(){Pepper.clickBlocker.hide()}.bind(this))}});registerAnyNs("Pepper.DeepLinking.Filter");Pepper.DeepLinking.Filter.Attribute=Class.create(anyLib.DeepLinking.Filter,{initialize:function(a,b){if(a){this.setName(a)}if(b){this.setValue(b)}},getName:function(){if(typeof(this._name)=="undefined"){this.setName(null)}return this._name},setName:function(a){this._name=a;return this},getValue:function(){if(typeof(this._value)=="undefined"){this.setValue(null)}return this._value},setValue:function(a){this._value=a;return this},isAllowed:function(a){if(!a.hasAttribute(this.getName())){return true}if(a[this.getName()]==this.getValue()){return false}return true}});registerAnyNs("Pepper.Lightbox",window);Pepper.Lightbox.Layout=Class.create(anyLib.UI.Lightbox.Layout,{initialize:function(){this.setTemplate(new Template('<div id="#{backgroundId}" style="display:none;"></div><div id="#{containerId}" style="display:none;"><div id="#{contentId}"></div><div class="paging"><a href="javascript:void(0);" title="#{translations.next}" class="next any_lightbox_button_next no-hash">#{translations.next} <span class="arrow"></span></a><a href="javascript:void(0);" title="#{translations.previous}" class="prev any_lightbox_button_prev no-hash">#{translations.previous} <span class="arrow"></span></a></div><a href="javascript:void(0);" title="#{translations.close}" class="close any_lightbox_button_close no-hash">#{translations.close}</a></div>'))},getTranslations:function(){if(typeof(this._translations)=="undefined"){this.setTranslations(new anyLib.Collection.KeyValue())}return this._translations},setTranslations:function(a){this._translations=a;return this},getTemplateData:function($super){var c=$super();var d=Object.keys(this.getTranslations().getAll());var b=Object.values(this.getTranslations().getAll());if(d.length>0){c.translations={};for(var a=0;a<d.length;a++){c.translations[d[a]]=b[a]}}return c}});registerAnyNs("Pepper.Lightbox",window);Pepper.Lightbox.Content=Class.create(anyLib.UI.Lightbox.Content,{getHeadline:function(){if(typeof(this._headline)=="undefined"){this.setHeadline(null)}return this._headline},setHeadline:function(a){this._headline=a;return this},getDescription:function(){if(typeof(this._description)=="undefined"){this.setDescription(null)}return this._description},setDescription:function(a){this._description=a;return this},getTemplate:function(){if(typeof(this._template)=="undefined"){this.setTemplate(new Template('<h2>#{headline}</h2><div class="content">#{content}</div> #{description}'))}return this._template},setTemplate:function(a){this._template=a;return this},toString:function(){return this.getTemplate().evaluate({content:this.getContent(),headline:this.getHeadline(),description:this.getDescription()})}});registerAnyNs("Pepper.Lightbox.Content",window);Pepper.Lightbox.Content.YouTube=Class.create(Pepper.Lightbox.Content,{getTemplate:function(){if(typeof(this._template)=="undefined"){this.setTemplate(new Template('<h2>#{headline}</h2><div class="content"><object style="height: 349px; width: 620px"><param name="movie" value="http://www.youtube.com/v/#{content}?version=3"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><embed src="http://www.youtube.com/v/#{content}?version=3" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="620" height="349"></object></div>'))}return this._template}});registerAnyNs("Pepper.Lightbox.Content",window);Pepper.Lightbox.Content.Image=Class.create(Pepper.Lightbox.Content,{getTemplate:function(){if(typeof(this._template)=="undefined"){this.setTemplate(new Template('<h2>#{headline}</h2><div class="content"><img src="#{content}" /></div>'))}return this._template}});registerAnyNs("Pepper.Portfolio",window);Pepper.Portfolio.Solutions=Class.create({initialize:function(c,b,a){if(c){this.setDefaultWidth(c)}if(b){this.setSmallWidth(b)}if(a){this.setLargeWidth(a)}},getSolutions:function(){if(typeof(this._solutions)=="undefined"){this.setSolutions(new anyLib.Collection.KeyValue())}return this._solutions},setSolutions:function(a){this._solutions=a;return this},addSolution:function(a){a.onTrigger.add(function(b){this.trigger(b)}.bind(this));this.getSolutions().add(a.getKey(),a)},getCurrent:function(){if(typeof(this._current)=="undefined"){this.setCurrent(null)}return this._current},setCurrent:function(a){this._current=a;return this},getDefaultWidth:function(){if(typeof(this._defaultWidth)=="undefined"){this.setDefaultWidth(null)}return this._defaultWidth},setDefaultWidth:function(a){this._defaultWidth=a;return this},getSmallWidth:function(){if(typeof(this._smallWidth)=="undefined"){this.setSmallWidth(null)}return this._smallWidth},setSmallWidth:function(a){this._smallWidth=a;return this},getLargeWidth:function(){if(typeof(this._largeWidth)=="undefined"){this.setLargeWidth(null)}return this._largeWidth},setLargeWidth:function(a){this._largeWidth=a;return this},trigger:function(a){if(!this.getSolutions().hasKey(a.getKey())){return}if(this.getCurrent()==a.getKey()){return}var b=Object.values(this.getSolutions().getAll());b=b.without(a);b.each(function(c){c.shrinkTo(this.getSmallWidth())}.bind(this));a.growTo(this.getLargeWidth())}});registerAnyNs("Pepper.Portfolio.Solutions",window);Pepper.Portfolio.Solutions.Solution=Class.create({initialize:function(b,a){if(b){this.setElement(b)}if(a){this.setKey(a)}this.onTrigger=new anyLib.Event.Collection();this.animationEnd=new anyLib.Event.Collection();this.animationStart=new anyLib.Event.Collection()},getElement:function(){if(typeof(this._element)=="undefined"){this.setElement(null)}return this._element},setElement:function(a){this._element=a;this._setContent(this.getElement().down(".content"));this._setClickHandle(this.getElement().on("click",this.trigger.bind(this)));return this},_getContent:function(){if(typeof(this._content)=="undefined"){this._setContent(null)}return this._content},_setContent:function(a){this._content=a;return this},_getClickHandle:function(){if(typeof(this._clickHandle)=="undefined"){this._setClickHandle(null)}return this._clickHandle},_setClickHandle:function(a){this._clickHandle=a;return this},getKey:function(){if(typeof(this._key)=="undefined"){this.setKey(null)}return this._key},setKey:function(a){this._key=a;return this},_getAnimations:function(){if(typeof(this._animations)=="undefined"){this._setAnimations(new anyLib.Collection.KeyValue())}return this._animations},_setAnimations:function(a){this._animations=a;return this},trigger:function(){this.onTrigger.fire(this)},growTo:function(a){if(this._getAnimations().hasKey("content")&&this._getAnimations().get("content")!=null){this._getAnimations().get("content").cancel();this._getAnimations().set("content",null)}this._getAnimations().set("content",new Effect.Appear(this._getContent(),{to:1,fps:Pepper.settings.animations.portfolio.solutions.fps,duration:Pepper.settings.animations.portfolio.solutions.duration,afterFinish:function(){this._getAnimations().set("content",null)}.bind(this)}));this._morph(a,0.025,"wide")},shrinkTo:function(a){if(this.getElement().measure("width")==a){return}if(this._getAnimations().hasKey("content")&&this._getAnimations().get("content")!=null){this._getAnimations().get("content").cancel();this._getAnimations().set("content",null)}this._getAnimations().set("content",new Effect.Fade(this._getContent(),{to:0,fps:Pepper.settings.animations.portfolio.solutions.fps,duration:Pepper.settings.animations.portfolio.solutions.duration,afterFinish:function(){this._getAnimations().set("content",null)}.bind(this)}));this._morph(a,0,"narrow")},_morph:function(c,a,b){if(this._getAnimations().hasKey("morph")&&this._getAnimations().get("morph")!=null){this._getAnimations().get("morph").cancel();this._getAnimations().set("morph",null)}if(!a){a=0}this._getAnimations().set("morph",new Effect.Morph(this.getElement(),{delay:a,fps:Pepper.settings.animations.portfolio.solutions.fps,duration:Pepper.settings.animations.portfolio.solutions.duration,style:{width:c+"px"},afterFinish:function(){if(b=="wide"){this.getElement().removeClassName("narrow");this.getElement().addClassName("wide")}else{this.getElement().removeClassName("wide");this.getElement().addClassName("narrow")}this._getAnimations().set("morph",null)}.bind(this)}))}});registerAnyNs("Effect.Transitions");Effect.Transitions.EaseFromTo=function(a){if((a/=0.5)<1){return 0.5*Math.pow(a,0.3)}return -0.6*((a-=2)*Math.pow(a,2.4)-2.2)};Effect.Transitions.EaseFrom=function(a){return Math.pow(a,4)};Effect.Transitions.EaseTo=function(a){return Math.pow(a,0.3)};
