/* WSGC Copyright */
dojo.provide("wsgc");if(!dojo._hasResource["wsgc.js.CorporateTimelineScrollingController"]){dojo._hasResource["wsgc.js.CorporateTimelineScrollingController"]=true;dojo.provide("wsgc.js.CorporateTimelineScrollingController");dojo.declare("wsgc.js.CorporateTimelineScrollingController",null,{constructor:function(){dojo.style(dojo.query(".text-wrapper ul")[0],"overflow","hidden");dojo.query(".text-wrapper ul")[0].scrollTop=0;this.ceiling=2500;dojo.connect(dojo.query("#scroll-down a")[0],"onmouseover",this,"handleDownMouseOver");dojo.connect(dojo.query("#scroll-down a")[0],"onmouseout",this,"handleMouseOut");dojo.connect(dojo.query("#scroll-up a")[0],"onmouseover",this,"handleUpMouseOver");dojo.connect(dojo.query("#scroll-up a")[0],"onmouseout",this,"handleMouseOut");},pauseScroll:false,offset:0,ceiling:0,timeoutId:0,handleUpMouseOver:function(_1){this._doScrollUp(dojo.query(".text-wrapper ul")[0],this.offset);},_doScrollUp:function(_2,_3){instance=this;_2.scrollTop=_3;this.timeoutId=setTimeout(function(){if(_3>0){instance._doScrollUp(_2,(_2.scrollTop-4));}else{clearTimeout(instance.timeoutId);}},50);},handleDownMouseOver:function(_4){this._doScrollDown(dojo.query(".text-wrapper ul")[0],this.offset);},_doScrollDown:function(_5,_6){instance=this;_5.scrollTop=_6;this.timeoutId=setTimeout(function(){if(_6<instance.ceiling){instance._doScrollDown(_5,(_5.scrollTop+4));}else{clearTimeout(instance.timeoutId);}},50);},handleMouseOut:function(_7){clearTimeout(this.timeoutId);this.offset=dojo.query(".text-wrapper ul")[0].scrollTop;}});}if(!dojo._hasResource["wsgc.js.CorporateTimelineController"]){dojo._hasResource["wsgc.js.CorporateTimelineController"]=true;dojo.provide("wsgc.js.CorporateTimelineController");dojo.declare("wsgc.js.CorporateTimelineController",null,{constructor:function(){this.ceiling=dojo.query(".timelineItem").length;this.jumpToConnect=dojo.connect(dojo.byId("jumpTo"),"onchange",this,"replaceFromSelectBox");dojo.connect(dojo.byId("click-to-begin"),"onclick",this,function(_8){_8.preventDefault();_8.stopPropagation();this.doReplace(0);});dojo.style("timelineData","display","none");var _9;dojo.forEach(dojo.query("li.previous-event a",dojo.byId("timeline_0")),function(a){dojo.connect(a,"onclick",this,"handlePreviousClick");},this);dojo.forEach(dojo.query("li.next-event a",dojo.byId("timeline_0")),function(a){dojo.connect(a,"onclick",this,"handleNextClick");},this);},currentIndex:0,ceiling:0,jumpToConnect:0,handlePreviousClick:function(_c){_c.preventDefault();_c.stopPropagation();var _d=(parseInt(this.currentIndex,10)-1);this.doReplace(_d);},handleNextClick:function(_e){_e.preventDefault();_e.stopPropagation();var _f=(parseInt(this.currentIndex,10)+1);this.doReplace(_f);},handle1952b:function(){this.doReplace("triptoeurope");dojo.forEach(dojo.query("li.previous-event a",dojo.byId("viewBox")),function(a){dojo.connect(a,"onclick",this,function(evt){evt.preventDefault();evt.stopPropagation();this.doReplace(0);});},this);dojo.forEach(dojo.query("li.next-event a",dojo.byId("viewBox")),function(a){dojo.connect(a,"onclick",this,function(evt){evt.preventDefault();evt.stopPropagation();this.doReplace(1);});},this);},handlefirstStore:function(){this.doReplace("firststore");dojo.forEach(dojo.query("li.previous-event a",dojo.byId("viewBox")),function(a){dojo.connect(a,"onclick",this,function(evt){evt.preventDefault();evt.stopPropagation();this.doReplace(0);});},this);dojo.forEach(dojo.query("li.next-event a",dojo.byId("viewBox")),function(a){dojo.connect(a,"onclick",this,function(evt){evt.preventDefault();evt.stopPropagation();this.doReplace(2);});},this);},doReplace:function(_18){if(!dojo.byId("timeline_"+_18)){return;}dojo.byId("viewBox").innerHTML=dojo.byId("timeline_"+_18).innerHTML;dojo.forEach(dojo.query("li.previous-event a",dojo.byId("viewBox")),function(a){dojo.connect(a,"onclick",this,"handlePreviousClick");},this);dojo.forEach(dojo.query("li.next-event a",dojo.byId("viewBox")),function(a){dojo.connect(a,"onclick",this,"handleNextClick");},this);dojo.forEach(dojo.query("li.begining a",dojo.byId("viewBox")),function(a){dojo.connect(a,"onclick",this,function(evt){evt.preventDefault();evt.stopPropagation();var _1d=0;this.doReplace(_1d);});},this);dojo.forEach(dojo.query("li.present a",dojo.byId("viewBox")),function(a){dojo.connect(a,"onclick",this,function(evt){evt.preventDefault();evt.stopPropagation();var _20=this.ceiling-1;this.doReplace(_20);});},this);this.currentIndex=_18;},replaceFromSelectBox:function(evt){var _22=evt.currentTarget.value;if((typeof (_22)=="undefined")||(_22.split("_").length<2)){return false;}var _23=_22.split("_")[1];this.doReplace(_23);dojo.disconnect(this.jumpToConnect);dojo.byId("jumpTo").selectedIndex=0;this.jumpToConnect=dojo.connect(dojo.byId("jumpTo"),"onchange",this,"replaceFromSelectBox");}});}if(!dojo._hasResource["wsgc.js.CorpUtils"]){dojo._hasResource["wsgc.js.CorpUtils"]=true;dojo.provide("wsgc.js.CorpUtils");dojo.declare("wsgc.js.CorpUtils",null,{constructor:function(){dojo.query("ul.case-study-thumbnails a").forEach(function(_24){dojo.connect(_24,"onclick",function(evt){evt.preventDefault();evt.stopPropagation();var _26=evt.currentTarget.href;dojo.byId("hero-img").src=_26;});});dojo.query("ul.case-study-thumbnails a").forEach(function(_27){dojo.connect(_27,"onclick",function(evt){evt.preventDefault();evt.stopPropagation();var _29=evt.currentTarget.href;dojo.byId("hero-img").src=_29;});});dojo.query("ul.case-study-thumbnails img").forEach(dojo.hitch(this,function(_2a){dojo.connect(_2a,"onmouseover",this,"caseStudiesImageSwamp");dojo.connect(_2a,"onmouseout",this,"caseStudiesImageSwamp");}));dojo.query(".popup").forEach(function(_2b){dojo.connect(_2b,"onclick",function(evt){evt.preventDefault();evt.stopPropagation();var _2d=dojo.attr(evt.currentTarget,"rel");var _2e;var _2f,_30;try{_2e=dojo.fromJson(_2d);_2f=((!_2e)||(typeof (_2e.dim)=="undefined")||(typeof (_2e.dim.height)=="undefined")||(!_2e.dim.height))?460:_2e.dim.height;_30=((!_2e)||(typeof (_2e.dim)=="undefined")||(typeof (_2e.dim.width)=="undefined")||(!_2e.dim.width))?760:_2e.dim.width;}catch(e){_2f=460;_30=760;}var url=evt.currentTarget.href;var _32="toolbar=no,location=no,directories=no,scrollbars=1,resizable=1,height="+_2f+",width="+_30+",screenX=4,screenY=4,top=4,left=4";var win=window.open(url,"",_32);win.focus();});});dojo.query(".newWindow").forEach(function(_34){dojo.connect(_34,"onclick",function(evt){evt.preventDefault();evt.stopPropagation();var url=evt.currentTarget.href;var win=window.open(url);win.focus();});});if((dojo.isIE==6)||(dojo.isIE==7)){dojo.query("#brands li").forEach(function(_38){dojo.connect(_38,"onmouseover",function(evt){evt.currentTarget.className+=" brand-hover";});dojo.connect(_38,"onmouseout",function(evt){evt.currentTarget.className=evt.currentTarget.className.replace(new RegExp(" brand-hover\\b"),"");});});}if((dojo.isIE==6)||(dojo.isIE==7)){dojo.query("#channels li").forEach(function(_3b){dojo.connect(_3b,"onmouseover",function(evt){evt.currentTarget.className+=" channel-hover";});dojo.connect(_3b,"onmouseout",function(evt){evt.currentTarget.className=evt.currentTarget.className.replace(new RegExp(" channel-hover\\b"),"");});});}if((dojo.isIE==6)||(dojo.isIE==7)){dojo.query("ul.nav-sub li[class~=\"drop-down\"]]").forEach(function(_3e){dojo.connect(_3e,"onmouseover",function(evt){evt.currentTarget.className+=" drop-down-js";});dojo.connect(_3e,"onmouseout",function(evt){evt.currentTarget.className=evt.currentTarget.className.replace(new RegExp(" drop-down-js\\b"),"");});});}dojo.query("li.pdf-menu").forEach(function(_41){dojo.connect(_41,"onclick",function(evt){selectPanel(evt.currentTarget.id);});dojo.connect(_41,"onmouseover",function(evt){panelRollOn(evt.currentTarget.id);});dojo.connect(_41,"onmouseout",function(evt){panelRollOut(evt.currentTarget.id);});});},caseStudiesImageSwamp:function(evt){var _46=evt.currentTarget.src;evt.currentTarget.src=dojo.query("div.hidden-preload-imgs img[name=\""+dojo.attr(evt.currentTarget,"name")+"\"]")[0].src;dojo.query("div.hidden-preload-imgs img[name=\""+dojo.attr(evt.currentTarget,"name")+"\"]")[0].src=_46;},processForm:function(){var _47=document.getElementById("birthMonth");var _48=document.getElementById("birthDay");var _49=document.getElementById("birthYear");var day=_48.options[_48.selectedIndex].value;var _4b=_47.options[_47.selectedIndex].value;var _4c=_49.options[_49.selectedIndex].value;var _4d="";if(_4c!=""&&_4b!=""&&day!=""){_4d=_4c+"-"+_4b+"-"+day;}document.getElementById("birthDate").value=_4d;return true;},currentActivePanel:"",resetPanels:function(){document.getElementById("packaging-specs").className="pdf-menu";document.getElementById("folding-standards").className="pdf-menu";document.getElementById("pbteen-logos").className="pdf-menu";document.getElementById("new-packaging-artwork").className="pdf-menu";document.getElementById("packaging-artwork-archive").className="pdf-menu";document.getElementById("contact-pbteen").className="pdf-menu";},panelRollOn:function(_4e){document.getElementById(_4e).className="pdf-menu panel-on panel-roll";},panelRollOut:function(_4f){document.getElementById(_4f).className="pdf-menu";if(this.currentActivePanel!=""){document.getElementById(this.currentActivePanel).className="pdf-menu panel-on";}},selectPanel:function(_50){this.resetPanels();this.currentActivePanel=_50;document.getElementById(_50).className="pdf-menu panel-on";}});}

