function simplePopup(url){window.open(url);return false;}function confirmExtLegal(url){var acceptsTerms="You are about to leave the Electronic Arts website and go to a website owned by a third party.  Electronic Arts is not responsible for content on third party sites, and our privacy policy does not apply to their information collection practices.  Press OK to access the linked site or press CANCEL to return to your original page.";if(confirm(acceptsTerms)){window.open(url);}return false;}function confirmLegal(){var acceptsTerms='Terms & Conditions of Downloading Materials\n\nThe materials provided on this web site are provided "as is" without warranties of any kind.  Electronic Arts Inc., its subsidiaries, divisions, affiliates and licensors ("EA") disclaim all warranties, either express of implied, including but not limited to, warranties of merchantability and fitness for a particular purpose. To the extent allowed by applicable law, in no event will EA be liable for damages of any kind to your hardware, peripherals or software programs as a result of your download or use of our materials.\n\n You may download one copy of the materials onto a single computer for your personal, non-commercial, home use only, provided you keep intact all copyright, trademark and other proprietary notices.  No materials from this web site may be copied, reproduced, modified, republished, uploaded, posted, transmitted, broadcast or distributed in any way without the express written consent of EA.  Unauthorized use of the materials is a violation of EA\'s copyright and constitutes infringement of EA\'s proprietary rights.\n\nTo use these materials, you must agree to the above terms and conditions.  To accept this agreement and proceed with the download, click "OK" or click "Cancel" to decline.';return confirm(acceptsTerms);}function openPositionedWindow(url,name,width,height,x,y,status,scrollbars,moreProperties,openerName){openPopup(url,name,width,height,status,scrollbars,moreProperties);}function popWallpaper(url,width,height){if(confirmLegal()){openCenteredWindow(url,"pop",width,height,"yes");}}function openCenteredWindow(url,name,width,height){openPopup(url,name,width,height,"yes");}function openPopup(url,name,width,height,status,scrollbars,moreProperties){var agent=navigator.userAgent.toLowerCase();var x,y=0;if(screen){x=(screen.availWidth-width)/2;y=(screen.availHeight-height)/2;}if(!status){status="";}width+=(scrollbars!=""&&scrollbars!=null&&agent.indexOf("mac")==-1)?16:0;var properties="width="+width+",height="+height+",screenX="+x+",screenY="+y+",left="+x+",top="+y+((status)?",status":"")+",scrollbars"+((scrollbars)?"":"=no")+((moreProperties)?","+moreProperties:"");window.open(url,name,properties);return false;}var quickNav=new Class({initialize:function(containerID){this.navBox=$(containerID);if(!this.navBox){return;}this.trigger=this.navBox.getElement(".starter");this.menu=this.navBox.getElement(".secondary");this.menuEffect=new Fx.Slide(this.menu,{duration:300,transition:Fx.Transitions.Cubic.easeIn});this.menuEffect.hide();this.menu.style.visibility="visible";this.trigger.addEvent("click",function(e){e=new Event(e);this.menuEffect.toggle();e.stop();}.bind(this));}});function personaRedirect(){var returnTo=encodeURIComponent(this.document.location);var personaLink=$("gusChangePersona").get("href");if(personaLink.indexOf("?")>-1){if(personaLink.indexOf("&")>-1){personaLink=personaLink+"&";}}else{personaLink=personaLink+"?";}this.document.location=personaLink+"surl="+returnTo;}function logoutRedirect(){var returnTo=encodeURIComponent(this.document.location);var logoutLink=$("gus_logout_link").get("href");if(logoutLink.indexOf("?")>-1){if(logoutLink.indexOf("&")>-1){logoutLink=logoutLink+"&";}}else{logoutLink=logoutLink+"?";}this.document.location=logoutLink+"&surl="+returnTo;}function loginRedirect(){var returnTo=encodeURIComponent(this.document.location);var loginLink=$("gus_login_link").get("href");this.document.location=loginLink+"&surl="+returnTo;}function registerRedirect(){var returnTo=encodeURIComponent(this.document.location);var regLink=$("gus_register_link").get("href");this.document.location=regLink+"&surl="+returnTo;}HoverMenu=new Class({Implements:[Options],options:{},initialize:function(source,options){this.setOptions(options);this.source=$(source);this.subNav=this.source.getElement(".subNav");this.button=this.source.getElement(".btn");if(!this.source.hasClass("hoverMenu")){this.source.addEvent("mouseenter",(function(){$$(".subNav").each(function(el){el.setStyle("display","none");});this.source.addClass("hoverMenu");this.subNav.setStyles({display:"block"});}).bind(this));this.source.addEvent("mouseleave",(function(){this.source.removeClass("hoverMenu");$$(".subNav").each(function(el){el.setStyle("display","");});}).bind(this));}}});function ieHover(context){if(!context){return;}$$(context).each(function(hoverItem){hoverItem.addEvent("mouseover",function(event){hoverItem.addClass("hover");}.bind(this));hoverItem.addEvent("mouseout",function(event){hoverItem.removeClass("hover");}.bind(this));}.bind(this));}var loadComponent=new Class({initialize:function(targetDiv,hrefs,autoLoad){this.links=hrefs;this.targetDiv=targetDiv;this.getUrl(this.links,autoLoad);},getUrl:function(urls,autoLoad){if(autoLoad){urls.each(function(item,index){this.loadAjax(item.href);}.bind(this));}else{urls.each(function(item,index){item.addEvent("click",function(event){this.loadAjax(item.href);event.stop();}.bind(this));}.bind(this));}},loadAjax:function(myUrl){var myRequest=new Request.HTML({url:myUrl,method:"get",evalScripts:false,onSuccess:function(responseTree,responseElements,responseHTML,responseJavaScript){this.targetDiv.removeClass("preloader");this.targetDiv.set("html",responseHTML);eval(responseJavaScript);}.bind(this),onRequest:function(){this.targetDiv.empty();this.targetDiv.addClass("preloader");}.bind(this),onFailure:function(){this.targetDiv.removeClass("preloader");this.targetDiv.set("html",'<p class="error">Error loading component.</p>');}.bind(this)}).send();}});var Slideshow=new Class({Implements:[Options],options:{hasFade:true,loop:true,showNav:false,frameDelay:4000,items:"li",height:400,width:400,duration:"normal",version:"1.2.03",isTrans:false},initialize:function(containerId,options){this.container=$(containerId);this.setOptions(options);this.container.setStyles({position:"absolute",overflow:"hidden",height:this.options.height,width:this.options.width});this.myElements=this.container.getElements(this.options.items);if(this.myElements.length>1){this.currentIndex=0;this.zIndex=this.myElements.length;this.initElements();this.myElements[this.currentIndex].setStyle("visibility","visible");this.myTimer=this.goTo.delay(this.options.frameDelay,this,this.myElements[this.currentIndex]);}},initElements:function(){var tmpZ=this.zIndex;this.myElements.each(function(myElement){myElement.setStyles({zIndex:tmpZ,visibility:"hidden",position:"absolute",top:0,left:0,height:this.options.height,width:this.options.width});tmpZ--;}.bind(this));},goTo:function(curElement){if(this.options.isTrans==true){this.myElements.each(function(item,index){item.setStyle("opacity",0);}.bind(this));}(this.currentIndex==(this.myElements.length-1)&&this.options.loop)?this.currentIndex=0:this.currentIndex++;this.zIndex++;var nextElement=this.myElements[this.currentIndex];if($type(nextElement)){nextElement.setStyle("z-index",this.zIndex);if(this.options.hasFade){nextElement.setStyle("opacity",0);new Fx.Tween(nextElement,{transition:Fx.Transitions.Sine.easeOut,duration:this.options.duration,onStart:function(){if(this.options.showNav&&$type(this.onTransStart)=="function"){this.onTransStart();}}.bind(this),onComplete:function(){this.myTimer=this.goTo.delay(this.options.frameDelay,this,nextElement);}.bind(this)}).start("opacity",0,1);}else{this.myElements[this.currentIndex].setStyle("visibility","visible");if(this.options.showNav&&$type(this.onTransStart)=="function"){this.onTransStart();}this.myTimer=this.goTo.delay(this.options.frameDelay,this,nextElement);}}}});MooTools.More={version:"1.2.2.2"};var Log=new Class({log:function(){Log.logger.call(this,arguments);}});Log.logged=[];Log.logger=function(){if(window.console&&console.log){console.log.apply(console,arguments);}else{Log.logged.push(arguments);}};Fx.Slide=new Class({Extends:Fx,options:{mode:"vertical"},initialize:function(element,options){this.addEvent("complete",function(){this.open=(this.wrapper["offset"+this.layout.capitalize()]!=0);if(this.open&&Browser.Engine.webkit419){this.element.dispose().inject(this.wrapper);}},true);this.element=this.subject=$(element);this.parent(options);var wrapper=this.element.retrieve("wrapper");this.wrapper=wrapper||new Element("div",{styles:$extend(this.element.getStyles("margin","position"),{overflow:"hidden"})}).wraps(this.element);this.element.store("wrapper",this.wrapper).setStyle("margin",0);this.now=[];this.open=true;},vertical:function(){this.margin="margin-top";this.layout="height";this.offset=this.element.offsetHeight;},horizontal:function(){this.margin="margin-left";this.layout="width";this.offset=this.element.offsetWidth;},set:function(now){this.element.setStyle(this.margin,now[0]);this.wrapper.setStyle(this.layout,now[1]);return this;},compute:function(from,to,delta){return[0,1].map(function(i){return Fx.compute(from[i],to[i],delta);});},start:function(how,mode){if(!this.check(how,mode)){return this;}this[mode||this.options.mode]();var margin=this.element.getStyle(this.margin).toInt();var layout=this.wrapper.getStyle(this.layout).toInt();var caseIn=[[margin,layout],[0,this.offset]];var caseOut=[[margin,layout],[-this.offset,0]];var start;switch(how){case"in":start=caseIn;break;case"out":start=caseOut;break;case"toggle":start=(layout==0)?caseIn:caseOut;}return this.parent(start[0],start[1]);},slideIn:function(mode){return this.start("in",mode);},slideOut:function(mode){return this.start("out",mode);},hide:function(mode){this[mode||this.options.mode]();this.open=false;return this.set([-this.offset,0]);},show:function(mode){this[mode||this.options.mode]();this.open=true;return this.set([0,this.offset]);},toggle:function(mode){return this.start("toggle",mode);}});Element.Properties.slide={set:function(options){var slide=this.retrieve("slide");if(slide){slide.cancel();}return this.eliminate("slide").store("slide:options",$extend({link:"cancel"},options));},get:function(options){if(options||!this.retrieve("slide")){if(options||!this.retrieve("slide:options")){this.set("slide",options);}this.store("slide",new Fx.Slide(this,this.retrieve("slide:options")));}return this.retrieve("slide");}};Element.implement({slide:function(how,mode){how=how||"toggle";var slide=this.get("slide"),toggle;switch(how){case"hide":slide.hide(mode);break;case"show":slide.show(mode);break;case"toggle":var flag=this.retrieve("slide:flag",slide.open);slide[flag?"slideOut":"slideIn"](mode);this.store("slide:flag",!flag);toggle=true;break;default:slide.start(how,mode);}if(!toggle){this.eliminate("slide:flag");}return this;}});(function(){new Native({name:"Date",initialize:Date,protect:true});["now","parse","UTC"].each(function(method){Native.genericize(Date,method,true);});Date.Methods={};["Date","Day","FullYear","Hours","Milliseconds","Minutes","Month","Seconds","Time","TimezoneOffset","Week","Timezone","GMTOffset","DayOfYear","LastMonth","UTCDate","UTCDay","UTCFullYear","AMPM","UTCHours","UTCMilliseconds","UTCMinutes","UTCMonth","UTCSeconds"].each(function(method){Date.Methods[method.toLowerCase()]=method;});$each({ms:"Milliseconds",year:"FullYear",min:"Minutes",mo:"Month",sec:"Seconds",hr:"Hours"},function(value,key){Date.Methods[key]=value;});var zeroize=function(what,length){return"0".repeat(length-what.toString().length)+what;};Date.implement({set:function(prop,value){switch($type(prop)){case"object":for(var p in prop){this.set(p,prop[p]);}break;case"string":prop=prop.toLowerCase();var m=Date.Methods;if(m[prop]){this["set"+m[prop]](value);}}return this;},get:function(key){key=key.toLowerCase();var m=Date.Methods;if(m[key]){return this["get"+m[key]]();}return null;},clone:function(){return new Date(this.get("time"));},increment:function(interval,times){return this.multiply(interval,times);},decrement:function(interval,times){return this.multiply(interval,times,false);},multiply:function(interval,times,increment){interval=interval||"day";times=$pick(times,1);increment=$pick(increment,true);var multiplier=increment?1:-1;var month=this.format("%m").toInt()-1;var year=this.format("%Y").toInt();var time=this.get("time");var offset=0;switch(interval){case"year":times.times(function(val){if(Date.isLeapYear(year+val)&&month>1&&multiplier>0){val++;}if(Date.isLeapYear(year+val)&&month<=1&&multiplier<0){val--;}offset+=Date.units.year(year+val);});break;case"month":times.times(function(val){if(multiplier<0){val++;}var mo=month+(val*multiplier);var year=year;if(mo<0){year--;mo=12+mo;}if(mo>11||mo<0){year+=(mo/12).toInt()*multiplier;mo=mo%12;}offset+=Date.units.month(mo,year);});break;case"day":return this.set("date",this.get("date")+(multiplier*times));default:offset=Date.units[interval]()*times;break;}this.set("time",time+(offset*multiplier));return this;},isLeapYear:function(){return Date.isLeapYear(this.get("year"));},clearTime:function(){["hr","min","sec","ms"].each(function(t){this.set(t,0);},this);return this;},diff:function(d,resolution){resolution=resolution||"day";if($type(d)=="string"){d=Date.parse(d);}switch(resolution){case"year":return d.format("%Y").toInt()-this.format("%Y").toInt();break;case"month":var months=(d.format("%Y").toInt()-this.format("%Y").toInt())*12;return months+d.format("%m").toInt()-this.format("%m").toInt();break;default:var diff=d.get("time")-this.get("time");if(diff<0&&Date.units[resolution]()>(-1*(diff))){return 0;}else{if(diff>=0&&diff<Date.units[resolution]()){return 0;}}return((d.get("time")-this.get("time"))/Date.units[resolution]()).round();}return null;},getWeek:function(){var day=(new Date(this.get("year"),0,1)).get("date");return Math.round((this.get("dayofyear")+(day>3?day-4:day+3))/7);},getTimezone:function(){return this.toString().replace(/^.*? ([A-Z]{3}).[0-9]{4}.*$/,"$1").replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/,"$1$2$3");},getGMTOffset:function(){var off=this.get("timezoneOffset");return((off>0)?"-":" + ")+zeroize(Math.floor(Math.abs(off)/60),2)+zeroize(off%60,2);},parse:function(str){this.set("time",Date.parse(str));return this;},isValid:function(date){return !!(date||this).valueOf();},format:function(f){if(!this.isValid()){return"invalid date";}f=f||"%x %X";f=({db:"%Y-%m-%d %H:%M:%S",compact:"%Y%m%dT%H%M%S",iso8601:"%Y-%m-%dT%H:%M:%S%T",rfc822:"%a, %d %b %Y %H:%M:%S %Z","short":"%d %b %H:%M","long":"%B %d, %Y %H:%M"})[f.toLowerCase()]||f;var d=this;return f.replace(/\%([aAbBcdHIjmMpSUWwxXyYTZ\%])/g,function($1,$2){switch($2){case"a":return Date.getMsg("days")[d.get("day")].substr(0,3);case"A":return Date.getMsg("days")[d.get("day")];case"b":return Date.getMsg("months")[d.get("month")].substr(0,3);case"B":return Date.getMsg("months")[d.get("month")];case"c":return d.toString();case"d":return zeroize(d.get("date"),2);case"H":return zeroize(d.get("hr"),2);case"I":return((d.get("hr")%12)||12);case"j":return zeroize(d.get("dayofyear"),3);case"m":return zeroize((d.get("mo")+1),2);case"M":return zeroize(d.get("min"),2);case"p":return Date.getMsg(d.get("hr")<12?"AM":"PM");case"S":return zeroize(d.get("seconds"),2);case"U":return zeroize(d.get("week"),2);case"W":throw new Error("%W is not supported yet");case"w":return d.get("day");case"x":return d.format(Date.getMsg("shortDate"));case"X":return d.format(Date.getMsg("shortTime"));case"y":return d.get("year").toString().substr(2);case"Y":return d.get("year");case"T":return d.get("GMTOffset");case"Z":return d.get("Timezone");case"%":return"%";}return $2;});},setAMPM:function(ampm){ampm=ampm.toUpperCase();if(this.format("%H").toInt()>11&&ampm=="AM"){return this.decrement("hour",12);}else{if(this.format("%H").toInt()<12&&ampm=="PM"){return this.increment("hour",12);}}return this;}});Date.alias("diff","compare");Date.alias("format","strftime");var nativeParse=Date.parse;var daysInMonth=function(monthIndex,year){if(Date.isLeapYear(year.toInt())&&monthIndex===1){return 29;}return[31,28,31,30,31,30,31,31,30,31,30,31][monthIndex];};$extend(Date,{getMsg:function(key,args){return MooTools.lang.get("Date",key,args);},units:{ms:$lambda(1),second:$lambda(1000),minute:$lambda(60000),hour:$lambda(3600000),day:$lambda(86400000),week:$lambda(608400000),month:function(monthIndex,year){var d=new Date();return daysInMonth($pick(monthIndex,d.format("%m").toInt()),$pick(year,d.format("%Y").toInt()))*86400000;},year:function(year){year=year||new Date().format("%Y").toInt();return Date.isLeapYear(year.toInt())?31622400000:31536000000;}},isLeapYear:function(yr){return new Date(yr,1,29).getDate()==29;},fixY2K:function(d){if(!isNaN(d)){var newDate=new Date(d);if(newDate.get("year")<2000&&d.toString().indexOf(newDate.get("year"))<0){newDate.increment("year",100);}return newDate;}else{return d;}},parse:function(from){var t=$type(from);if(t=="number"){return new Date(from);}if(t!="string"){return from;}if(!from.length){return null;}var parsed;Date.parsePatterns.each(function(pattern,i){if(parsed){return;}var r=pattern.re.exec(from);if(r){parsed=pattern.handler(r);}});return parsed||new Date(nativeParse(from));},parseDay:function(day,num){var ret=-1;switch($type(day)){case"number":ret=Date.getMsg("days")[day-1]||false;if(!ret){throw new Error("Invalid day index value must be between 1 and 7");}break;case"string":var match=Date.getMsg("days").filter(function(name){return this.test(name);},new RegExp("^"+day,"i"));if(!match.length){throw new Error("Invalid day string");}if(match.length>1){throw new Error("Ambiguous day");}ret=match[0];}return(num)?Date.getMsg("days").indexOf(ret):ret;},parseMonth:function(month,num){var ret=-1;switch($type(month)){case"object":ret=Date.getMsg("months")[month.get("mo")];break;case"number":ret=Date.getMsg("months")[month-1]||false;if(!ret){throw new Error("Invalid month index value must be between 1 and 12:"+index);}break;case"string":var match=Date.getMsg("months").filter(function(name){return this.test(name);},new RegExp("^"+month,"i"));if(!match.length){throw new Error("Invalid month string");}if(match.length>1){throw new Error("Ambiguous month");}ret=match[0];}return(num)?Date.getMsg("months").indexOf(ret):ret;},parseUTC:function(value){var localDate=new Date(value);var utcSeconds=Date.UTC(localDate.get("year"),localDate.get("mo"),localDate.get("date"),localDate.get("hr"),localDate.get("min"),localDate.get("sec"));return new Date(utcSeconds);},orderIndex:function(unit){return Date.getMsg("dateOrder").indexOf(unit)+1;},parsePatterns:[{re:/^(\d{4})[\.\-\/](\d{1,2})[\.\-\/](\d{1,2})$/,handler:function(bits){return new Date(bits[1],bits[2]-1,bits[3]);}},{re:/^(\d{4})[\.\-\/](\d{1,2})[\.\-\/](\d{1,2})\s(\d{1,2}):(\d{1,2})(?:\:(\d{1,2}))?(\w{2})?$/,handler:function(bits){var d=new Date(bits[1],bits[2]-1,bits[3]);d.set("hr",bits[4]);d.set("min",bits[5]);d.set("sec",bits[6]||0);if(bits[7]){d.set("ampm",bits[7]);}return d;}},{re:/^(\d{1,2})[\.\-\/](\d{1,2})[\.\-\/](\d{2,4})$/,handler:function(bits){var d=new Date(bits[Date.orderIndex("year")],bits[Date.orderIndex("month")]-1,bits[Date.orderIndex("date")]);return Date.fixY2K(d);}},{re:/^(\d{1,2})[\.\-\/](\d{1,2})[\.\-\/](\d{2,4})\s(\d{1,2})[:\.](\d{1,2})(?:[\:\.](\d{1,2}))?(\w{2})?$/,handler:function(bits){var d=new Date(bits[Date.orderIndex("year")],bits[Date.orderIndex("month")]-1,bits[Date.orderIndex("date")]);d.set("hr",bits[4]);d.set("min",bits[5]);d.set("sec",bits[6]||0);if(bits[7]){d.set("ampm",bits[7]);}return Date.fixY2K(d);}}]});})();(function(){var data={language:"en-US",languages:{"en-US":{}},cascades:["en-US"]};var cascaded;MooTools.lang=new Events();$extend(MooTools.lang,{setLanguage:function(lang){if(!data.languages[lang]){return this;}data.language=lang;this.load();this.fireEvent("langChange",lang);return this;},load:function(){var langs=this.cascade(this.getCurrentLanguage());cascaded={};$each(langs,function(set,setName){cascaded[setName]=this.lambda(set);},this);},getCurrentLanguage:function(){return data.language;},addLanguage:function(lang){data.languages[lang]=data.languages[lang]||{};return this;},cascade:function(lang){var cascades=(data.languages[lang]||{}).cascades||[];cascades.combine(data.cascades);cascades.erase(lang).push(lang);var langs=cascades.map(function(lng){return data.languages[lng];},this);return $merge.apply(this,langs);},lambda:function(set){(set||{}).get=function(key,args){return $lambda(set[key]).apply(this,$splat(args));};return set;},get:function(set,key,args){if(cascaded&&cascaded[set]){return(key?cascaded[set].get(key,args):cascaded[set]);}},set:function(lang,set,members){this.addLanguage(lang);langData=data.languages[lang];if(!langData[set]){langData[set]={};}$extend(langData[set],members);if(lang==this.getCurrentLanguage()){this.load();this.fireEvent("langChange",lang);}return this;},list:function(){return Hash.getKeys(data.languages);}});})();MooTools.lang.set("en-US","Date",{months:["January","February","March","April","May","June","July","August","September","October","November","December"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dateOrder:["month","date","year"],shortDate:"%m/%d/%Y",shortTime:"%I:%M%p",AM:"AM",PM:"PM",ordinal:function(dayOfMonth){return(dayOfMonth>3&&dayOfMonth<21)?"th":["th","st","nd","rd","th"][Math.min(dayOfMonth%10,4)];},lessThanMinuteAgo:"less than a minute ago",minuteAgo:"about a minute ago",minutesAgo:"{delta} minutes ago",hourAgo:"about an hour ago",hoursAgo:"about {delta} hours ago",dayAgo:"1 day ago",daysAgo:"{delta} days ago",lessThanMinuteUntil:"less than a minute from now",minuteUntil:"about a minute from now",minutesUntil:"{delta} minutes from now",hourUntil:"about an hour from now",hoursUntil:"about {delta} hours from now",dayUntil:"1 day from now",daysUntil:"{delta} days from now"});Hash.implement({getFromPath:function(notation){var source=this.getClean();notation.replace(/\[([^\]]+)\]|\.([^.[]+)|[^[.]+/g,function(match){if(!source){return null;}var prop=arguments[2]||arguments[1]||arguments[0];source=(prop in source)?source[prop]:null;return match;});return source;},cleanValues:function(method){method=method||$defined;this.each(function(v,k){if(!method(v)){this.erase(k);}},this);return this;},run:function(){var args=arguments;this.each(function(v,k){if($type(v)=="function"){v.run(args);}});}});(function(){var special=[];var standard=[];var tidymap={"[\xa0\u2002\u2003\u2009]":" ","\xb7":"*","[\u2018\u2019]":"'","[\u201c\u201d]":'"',"\u2026":"...","\u2013":"-","\u2014":"--","\uFFFD":"&raquo;"};String.implement({standardize:function(){var text=this;special.each(function(ch,i){text=text.replace(new RegExp(ch,"g"),standard[i]);});return text;},repeat:function(times){return new Array(times+1).join(this);},pad:function(length,str,dir){if(this.length>=length){return this;}str=str||" ";var pad=str.repeat(length-this.length).substr(0,length-this.length);if(!dir||dir=="right"){return this+pad;}if(dir=="left"){return pad+this;}return pad.substr(0,(pad.length/2).floor())+this+pad.substr(0,(pad.length/2).ceil());},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"");},tidy:function(){var txt=this.toString();$each(tidymap,function(value,key){txt=txt.replace(new RegExp(key,"g"),value);});return txt;}});})();Fx.Scroll=new Class({Extends:Fx,options:{offset:{x:0,y:0},wheelStops:true},initialize:function(element,options){this.element=this.subject=$(element);this.parent(options);var cancel=this.cancel.bind(this,false);if($type(this.element)!="element"){this.element=$(this.element.getDocument().body);}var stopper=this.element;if(this.options.wheelStops){this.addEvent("start",function(){stopper.addEvent("mousewheel",cancel);},true);this.addEvent("complete",function(){stopper.removeEvent("mousewheel",cancel);},true);}},set:function(){var now=Array.flatten(arguments);this.element.scrollTo(now[0],now[1]);},compute:function(from,to,delta){return[0,1].map(function(i){return Fx.compute(from[i],to[i],delta);});},start:function(x,y){if(!this.check(x,y)){return this;}var offsetSize=this.element.getSize(),scrollSize=this.element.getScrollSize();var scroll=this.element.getScroll(),values={x:x,y:y};for(var z in values){var max=scrollSize[z]-offsetSize[z];if($chk(values[z])){values[z]=($type(values[z])=="number")?values[z].limit(0,max):max;}else{values[z]=scroll[z];}values[z]+=this.options.offset[z];}return this.parent([scroll.x,scroll.y],[values.x,values.y]);},toTop:function(){return this.start(false,0);},toLeft:function(){return this.start(0,false);},toRight:function(){return this.start("right",false);},toBottom:function(){return this.start(false,"bottom");},toElement:function(el){var position=$(el).getPosition(this.element);return this.start(position.x,position.y);}});var SmoothScroll=Fx.SmoothScroll=new Class({Extends:Fx.Scroll,initialize:function(options,context){context=context||document;this.doc=context.getDocument();var win=context.getWindow();this.parent(this.doc,options);this.links=this.options.links?$$(this.options.links):$$(this.doc.links);var location=win.location.href.match(/^[^#]*/)[0]+"#";this.links.each(function(link){if(link.href.indexOf(location)!=0){return;}var anchor=link.href.substr(location.length);if(anchor){this.useLink(link,anchor);}},this);if(!Browser.Engine.webkit419){this.addEvent("complete",function(){win.location.hash=this.anchor;},true);}},useLink:function(link,anchor){var el;link.addEvent("click",function(event){if(el!==false&&!el){el=$(anchor)||this.doc.getElement("a[name="+anchor+"]");}if(el){event.preventDefault();this.anchor=anchor;this.toElement(el);link.blur();}}.bind(this));}});Element.implement({measure:function(fn){var vis=function(el){return !!(!el||el.offsetHeight||el.offsetWidth);};if(vis(this)){return fn.apply(this);}var parent=this.getParent(),toMeasure=[],restorers=[];while(!vis(parent)&&parent!=document.body){toMeasure.push(parent.expose());parent=parent.getParent();}var restore=this.expose();var result=fn.apply(this);restore();toMeasure.each(function(restore){restore();});return result;},expose:function(){if(this.getStyle("display")!="none"){return $empty;}var before=this.getStyles("display","position","visibility");return this.setStyles({display:"block",position:"absolute",visibility:"hidden"}).setStyles.pass(before,this);},getDimensions:function(options){options=$merge({computeSize:false},options);var dim={};var getSize=function(el,options){return(options.computeSize)?el.getComputedSize(options):el.getSize();};if(this.getStyle("display")=="none"){dim=this.measure(function(){return getSize(this,options);});}else{try{dim=getSize(this,options);}catch(e){}}return $chk(dim.x)?$extend(dim,{width:dim.x,height:dim.y}):$extend(dim,{x:dim.width,y:dim.height});},getComputedSize:function(options){options=$merge({styles:["padding","border"],plains:{height:["top","bottom"],width:["left","right"]},mode:"both"},options);var size={width:0,height:0};switch(options.mode){case"vertical":delete size.width;delete options.plains.width;break;case"horizontal":delete size.height;delete options.plains.height;break;}var getStyles=[];$each(options.plains,function(plain,key){plain.each(function(edge){options.styles.each(function(style){getStyles.push((style=="border")?style+"-"+edge+"-width":style+"-"+edge);});});});var styles={};getStyles.each(function(style){styles[style]=this.getComputedStyle(style);},this);var subtracted=[];$each(options.plains,function(plain,key){var capitalized=key.capitalize();size["total"+capitalized]=0;size["computed"+capitalized]=0;plain.each(function(edge){size["computed"+edge.capitalize()]=0;getStyles.each(function(style,i){if(style.test(edge)){styles[style]=styles[style].toInt()||0;size["total"+capitalized]=size["total"+capitalized]+styles[style];size["computed"+edge.capitalize()]=size["computed"+edge.capitalize()]+styles[style];}if(style.test(edge)&&key!=style&&(style.test("border")||style.test("padding"))&&!subtracted.contains(style)){subtracted.push(style);size["computed"+capitalized]=size["computed"+capitalized]-styles[style];}});});});["Width","Height"].each(function(value){var lower=value.toLowerCase();if(!$chk(size[lower])){return;}size[lower]=size[lower]+this["offset"+value]+size["computed"+value];size["total"+value]=size[lower]+size["total"+value];delete size["computed"+value];},this);return $extend(styles,size);}});var Tips=new Class({Implements:[Events,Options],options:{onShow:function(tip){tip.setStyle("visibility","visible");},onHide:function(tip){tip.setStyle("visibility","hidden");},title:"title",text:function(el){return el.get("rel")||el.get("href");},showDelay:100,hideDelay:100,className:"myTooltip",offset:{x:16,y:16},fixed:false},initialize:function(){var params=Array.link(arguments,{options:Object.type,elements:$defined});if(params.options&&params.options.offsets){params.options.offset=params.options.offsets;}this.setOptions(params.options);this.container=new Element("div",{"class":"tip"});this.tip=this.getTip();if(params.elements){this.attach(params.elements);}},getTip:function(){if(!this.options.targetElm){this.options.targetElm=document.body;}return new Element("div",{"class":this.options.className,styles:{visibility:"hidden",display:"none",position:"absolute",top:0,left:0}}).adopt(new Element("div",{"class":"tip-top"}),this.container,new Element("div",{"class":"tip-bottom"})).inject(this.options.targetElm);},attach:function(elements){var read=function(option,element){if(option==null){return"";}return $type(option)=="function"?option(element):element.get(option);};$$(elements).each(function(element){var title=read(this.options.title,element);element.erase("title").store("tip:native",title).retrieve("tip:title",title);element.retrieve("tip:text",read(this.options.text,element));var events=["enter","leave"];if(!this.options.fixed){events.push("move");}events.each(function(value){element.addEvent("mouse"+value,element.retrieve("tip:"+value,this["element"+value.capitalize()].bindWithEvent(this,element)));},this);},this);return this;},detach:function(elements){$$(elements).each(function(element){["enter","leave","move"].each(function(value){element.removeEvent("mouse"+value,element.retrieve("tip:"+value)||$empty);});element.eliminate("tip:enter").eliminate("tip:leave").eliminate("tip:move");if($type(this.options.title)=="string"&&this.options.title=="title"){var original=element.retrieve("tip:native");if(original){element.set("title",original);}}},this);return this;},elementEnter:function(event,element){$A(this.container.childNodes).each(Element.dispose);["title","text"].each(function(value){var content=element.retrieve("tip:"+value);if(!content){return;}this[value+"Element"]=new Element("div",{"class":"tip-"+value}).inject(this.container);this.fill(this[value+"Element"],content);},this);this.timer=$clear(this.timer);this.timer=this.show.delay(this.options.showDelay,this,element);this.tip.setStyle("display","block");this.position((!this.options.fixed)?event:{page:element.getPosition()});},elementLeave:function(event,element){$clear(this.timer);this.tip.setStyle("display","none");this.timer=this.hide.delay(this.options.hideDelay,this,element);},elementMove:function(event){this.position(event);},position:function(event){var size=window.getSize(),scroll=window.getScroll(),tip={x:this.tip.offsetWidth,y:this.tip.offsetHeight},props={x:"left",y:"top"},obj={};for(var z in props){obj[props[z]]=event.page[z]+this.options.offset[z];if((obj[props[z]]+tip[z]-scroll[z])>size[z]){obj[props[z]]=event.page[z]-this.options.offset[z]-tip[z];}}this.tip.setStyles(obj);},fill:function(element,contents){if(typeof contents=="string"){element.set("html",contents);}else{element.adopt(contents);}},show:function(el){this.fireEvent("show",[this.tip,el]);},hide:function(el){this.fireEvent("hide",[this.tip,el]);}});var FilmStrip=new Class({initialize:function(myOptions){this.myOptions=myOptions;this.container=$(this.myOptions.id);this.getElements();this.initPaging();if(this.myOptions.scrollDir=="vertical"){this.filmStrip.setStyle("height",this.pages*this.viewPortHeight+"px");}else{this.filmStrip.setStyle("left","0");this.filmStrip.setStyle("width",this.pages*(this.viewPortWidth+this.offset)+"px");}($type(this.myOptions.transitionSpeed))?this.transitionSpeed=this.myOptions.transitionSpeed:this.transitionSpeed=200;($type(this.myOptions.transitionType))?this.transitionType=this.myOptions.transitionType:this.transitionType=Fx.Transitions.Sine.easeInOut;this.setupEffect();this.setPaginationControls();this.nextButton.removeEvents();this.nextButton.addEvent("click",function(e){e=new Event(e);this.setPage(1);e.stop();}.bind(this));this.prevButton.removeEvents();this.prevButton.addEvent("click",function(e){e=new Event(e);this.setPage(-1);e.stop();}.bind(this));},setupEffect:function(){this.pageSlider=new Fx.Tween(this.filmStrip,{duration:this.transitionSpeed,transition:this.transitionType});},getElements:function(){this.viewPort=this.container.getElement(this.myOptions.viewPort);this.filmStrip=this.viewPort.getElement(this.myOptions.filmStrip);this.prevButton=this.container.getElement(this.myOptions.prevButton);this.nextButton=this.container.getElement(this.myOptions.nextButton);(this.myOptions.offset)?this.offset=this.myOptions.offset:this.offset=0;(this.myOptions.caption)?this.caption=this.container.getElement(this.myOptions.caption):this.caption=false;(this.myOptions.items)?this.activityLabels=this.filmStrip.getElements(this.myOptions.items):this.activityLabels=this.filmStrip.getElements("a");this.getElementSize();},getElementSize:function(){($type(this.myOptions.viewPortWidth))?this.viewPortWidth=this.myOptions.viewPortWidth:this.viewPortWidth=this.viewPort.getSize().x;($type(this.myOptions.viewPortHeight))?this.viewPortHeight=this.myOptions.viewPortHeight:this.viewPortHeight=this.viewPort.getSize().y;($type(this.myOptions.filmStripHeight))?this.filmStripHeight=this.myOptions.filmStripHeight:this.filmStripHeight=this.filmStrip.getSize().y;},initPaging:function(){this.curPage=0;if(this.myOptions.scrollDir=="vertical"){this.pages=Math.ceil(this.filmStripHeight/this.viewPortHeight);}else{this.itemPerPage=this.myOptions.itemPerPage;this.numResults=+this.activityLabels.length;this.pages=Math.ceil(this.numResults/this.itemPerPage);}},goToItem:function(item){var targetPage=(Math.ceil((item+1)/this.myOptions.itemPerPage))-1;var diff=targetPage-this.curPage;if(diff!=0){this.setPage(diff);}},setPage:function(direction){this.curPage=this.curPage+direction;var filmstripScrollPosition;if(this.myOptions.scrollDir=="vertical"){filmstripScrollPosition=this.viewPortHeight*-(this.curPage);}else{filmstripScrollPosition=(this.viewPortWidth+this.offset)*-(this.curPage);}(this.myOptions.scrollDir=="vertical")?this.styleType="top":this.styleType="left";this.pageSlider.cancel();this.pageSlider.start(this.styleType,filmstripScrollPosition);this.setPaginationControls();},setPaginationControls:function(){(this.curPage==0)?this.prevButton.setStyle("visibility","hidden"):this.prevButton.setStyle("visibility","visible");(this.curPage==(this.pages-1)||this.numResults==0)?this.nextButton.setStyle("visibility","hidden"):this.nextButton.setStyle("visibility","visible");if(this.caption){var myFXin=new Fx.Morph(this.caption,{duration:150,transition:Fx.Transitions.Quad.easeOut});var myFXout=new Fx.Morph(this.caption,{duration:150,transition:Fx.Transitions.Quad.easeIn});myFXin.start({opacity:"0"}).chain(function(){this.caption.innerHTML=this.activityLabels[this.curPage].innerHTML;myFXout.start({opacity:"1"});}.bind(this));}if($type(this.myOptions.pageCurrent)){this.container.getElement(this.myOptions.pageCurrent).innerHTML=this.curPage+1;}if(this.myOptions.pageTotal){this.container.getElement(this.myOptions.pageTotal).innerHTML=this.pages;}}});var Twitter=new Class({initialize:function(containerID,feedID,userID){this.myContainer=$(containerID).getElement("span.feed");this.feedURL="jsonProxy.action";this.userID=userID;this.textLength=40;this.feedID=feedID;new Request.JSON({url:this.feedURL+"?feed="+feedID,onSuccess:function(responseJSON,responseText){if(responseJSON){if(responseJSON.results.length==0){this.myContainer.innerHTML="Unable to retrieve Twitter posts. Please try again later.";}else{this.writeFeed(responseJSON.results[0]);}}else{this.myContainer.innerHTML="Feed not available.";}}.bind(this),onFailure:function(data){this.myContainer.innerHTML="Feed not available.";}.bind(this)}).send();},writeFeed:function(responseJSON){var text=responseJSON.text;var fullText=responseJSON.text;var link="http://twitter.com/"+this.userID;if(text.length>this.textLength){text=text.slice(0,this.textLength)+"...";}var myElement=new Element("a",{href:link,onclick:"omniLinkCall(this, 'global-header-twitter')","class":"feed",html:"<strong>"+this.userID+":</strong> "+text,title:fullText,events:{click:function(){return confirmExtLegal(link);}}});myElement.replaces(this.myContainer);}});var reviewsWidget=new Class({initialize:function(containerID,reviewsArray,btn){this.myReviews=reviewsArray;this.myContainer=$(containerID);this.myButton=this.myContainer.getElement(btn);this.myBody=this.myContainer.getElement(".content");this.myQuote=this.myContainer.getElement(".quote");this.myBodyTarget=this.myContainer.getElement(".contentTarget");this.myLink=this.myContainer.getElement(".more");this.myCredit=this.myContainer.getElement(".credit");this.randomKey=0;this.myLink.addEvent("click",function(e){omniLinkCall(this,"global-review-more");return confirmExtLegal(this.href);e.stop();});this.myButton.addEvent("click",function(e){var key=$random(0,(this.myReviews.length-1));this.showRating(key);e.stop();}.bind(this));var key=$random(0,(this.myReviews.length-1));this.showRating(key);},showRating:function(key){if(this.randomKey==key){(key==0)?key=this.myReviews.length-1:key--;}var myFx1=new Fx.Tween(this.myQuote,{duration:250});myFx1.start("opacity","0").chain(function(){this.myCredit.innerHTML=this.myReviews[key][1];this.myBodyTarget.innerHTML=this.myReviews[key][2];myFx1.start("opacity","1");}.bind(this));this.myLink.setProperty("href",this.myReviews[key][3]);this.randomKey=key;}});var dykWidget=new Class({initialize:function(containerID,dykArray,delay){this.myContainer=$(containerID);this.myFacts=dykArray;this.delay=delay;this.autoIncrement=true;this.cookieName="EAActive-dykWidget";this.myFade=this.myContainer.getElement(".fade");this.myTitle=this.myContainer.getElement("h2");this.myBody=this.myContainer.getElement("p");this.myCurrentItem=this.myContainer.getElement(".currentPage");this.myItemCount=this.myContainer.getElement(".numPages");this.myPrevBtn=this.myContainer.getElement(".btnPrev");this.myNextBtn=this.myContainer.getElement(".btnNext");this.myFx=new Fx.Morph(this.myFade,{duration:200,transition:Fx.Transitions.Quad.easeIn});if(Cookie.read(this.cookieName)){this.currentInt=parseInt(Cookie.read(this.cookieName));}else{this.currentInt=0;}this.myItemCount.set("html",this.myFacts.length);this.loadFact(this.currentInt);this.myPrevBtn.addEvent("click",function(e){this.incrementFact(-1);this.autoIncrement=false;e.stop();}.bind(this));this.myNextBtn.addEvent("click",function(e){this.incrementFact();this.autoIncrement=false;e.stop();}.bind(this));},loadFact:function(i){this.currentInt=i;Cookie.write(this.cookieName,this.currentInt);this.myFx.start({opacity:"0"}).chain(function(){this.myCurrentItem.set("html",this.currentInt+1);this.myTitle.set("html",this.myFacts[i][1]);this.myBody.set("html",this.myFacts[i][2]);this.myFx.start({opacity:"1"});}.bind(this));this.ticker.delay(this.delay,this);},incrementFact:function(i){if(i==-1){if(this.currentInt<=0){var i=this.myFacts.length-1;}else{var i=this.currentInt-1;}}else{if(this.currentInt>=(this.myFacts.length-1)){var i=0;}else{var i=this.currentInt+1;}}this.loadFact(i);},ticker:function(){if(this.autoIncrement){this.incrementFact();}}});var Overlay=new Class({initialize:function(containerID,trigger,popupHeight,autoOpen,toTop){this.myContainer=$(containerID);this.toTop=toTop;this.myFade=this.myContainer.getElement(".fade");this.myPopup=this.myContainer.getElement(".popup");this.myWrapper=this.myContainer.getElement(".wrapper");if(this.myContainer.getElements(".close")){this.closeButtons=this.myContainer.getElements(".close");this.closeButtons.each(function(item){item.addEvent("click",function(e){this.closeOverlay();e.stop();}.bind(this));}.bind(this));}if(trigger){this.myTriggers=document.getElements(trigger);this.myTriggers.each(function(item){item.addEvent("click",function(e){this.showOverlay();e.stop();}.bind(this));}.bind(this));}this.myPopupHeight=popupHeight+"px";if(autoOpen){this.showOverlay();}},showOverlay:function(){if((Browser.Engine.trident)&&(Browser.Engine.version<=4)){var topPos=(this.toTop)?274:document.documentElement.scrollTop+274;var fadeWidth=document.documentElement.clientWidth;this.myPopup.setStyle("position","absolute");this.myPopup.setStyle("top",topPos+"px");this.myFade.setStyle("width",fadeWidth+"px");this.myPopup.setStyle("left",fadeWidth/2+"px");}if(this.toTop){var myScroll=new Fx.Scroll(window).toTop(this);}this.myFade.setStyle("opacity","0");this.myPopup.setStyle("height","0px");this.myWrapper.setStyle("opacity","0");this.myContainer.setStyle("display","block");var myFx1=new Fx.Tween(this.myFade,{duration:500});var myFx2=new Fx.Tween(this.myPopup,{duration:500});var myFx3=new Fx.Tween(this.myWrapper,{duration:500});myFx1.start("opacity",".8").chain(function(){myFx2.start("height",this.myPopupHeight).chain(function(){myFx3.start("opacity","1");});}.bind(this));},closeOverlay:function(){this.myContainer.setStyle("display","none");}});var Polls=new Class({initialize:function(containerID,pollID){this.pollURL="polls.action";this.pollID=pollID;this.myContainer=$(containerID);this.loadPoll();},loadPoll:function(params){if(!params){params="";}if(Cookie.read("EAActive-poll-"+this.pollID)){params+="&result=true";}new Request.HTML({url:this.pollURL+"?pollsName="+this.pollID+params,onSuccess:function(responseTree,responseElements,responseHTML){this.loadContent(responseHTML);}.bind(this),onRequest:function(){this.setStatus("Calculating poll data...");}.bind(this),onFailure:function(){this.setStatus("Polls cannot be loaded at this time.");}.bind(this)}).send();},loadContent:function(responseHTML){this.myContainer.set("html",responseHTML);if($("pollSubmit")){$("pollSubmit").addEvent("click",function(e){this.submitPoll();e.stop();}.bind(this));}this.myBars=this.myContainer.getElements(".bar");if(this.myBars){this.drawBars();}},submitPoll:function(){var myCookie=Cookie.write("EAActive-poll-"+this.pollID,true,{duration:7});var myForm=this.myContainer.getElement("form");var myVotes=myForm.getElements(".vote");var choiceID=false;myVotes.each(function(item){if(item.checked){choiceID=item.value;}});var params="";params+="&result=true";params+="&pollQuestionId="+myForm.getElement("#pollID").value;if(choiceID){params+="&choiceId="+choiceID;}this.loadPoll(params);},setStatus:function(msg){this.myContainer.innerHTML="<p>"+msg+"</p>";},drawBars:function(){this.myBars.each(function(item){var percentage=item.getElement(".percentage");var offset=parseInt((273-(percentage.innerHTML*2.73*100))*-1);var realPercentage=parseInt(percentage.innerHTML*100)+"%";percentage.innerHTML=realPercentage;var myFx1=new Fx.Tween(item,{duration:1000});if(Browser.Engine.trident){myFx1.start("background-position-x",offset+"px");}else{myFx1.start("background-position",offset+"px 0px");}});}});var Sharing=new Class({initialize:function(containerID,trigger,overlayRef){this.myContainer=$(containerID);this.myTarget=this.myContainer.getElement(".sites");this.myTextarea=this.myContainer.getElement("textarea");this.overlayRef=overlayRef;this.myTextarea.addEvent("click",function(e){this.focus();this.select();});this.mySites=new Array();this.mySites[0]=new Array("facebook","send to Facebook","http://www.facebook.com/sharer.php?u=[URL]&t=[TITLE]");this.mySites[1]=new Array("delicious","send to del.icio.us","http://del.icio.us/post?url=[URL]&title=[TITLE]");this.mySites[2]=new Array("digg","send to digg","http://digg.com/submit?phase=2&url=[URL]&title=[TITLE]");this.mySites[3]=new Array("stumbleupon","send to stumbleupon","http://www.stumbleupon.com/refer.php?url=[URL]&title=[TITLE]");this.mySites[4]=new Array("twitter","send to twitter","http://twitter.com/timeline/home?status=[URL]");if(trigger){this.myTriggers=document.getElements(trigger);this.myTriggers.each(function(item){item.addEvent("click",function(e){if(item.title){this.title=item.title;}else{this.title=document.title;}if(item.href){this.url=item.href;}else{this.url=window.location;}this.buildLinks();e.stop();}.bind(this));}.bind(this));}},buildLinks:function(){this.myTextarea.empty();this.myTextarea.setProperty("html",this.url);this.myTarget.empty();this.mySites.each(function(item){var link=item[2].replace("[URL]",encodeURIComponent(this.url)).replace("[TITLE]",encodeURI(this.title));var a=new Element("a",{"class":item[0],title:item[1],href:link});a.inject(this.myTarget);a.addEvent("click",function(e){e.stop();return confirmExtLegal(link);if(this.overlayRef){this.overlayRef.closeOverlay();}}.bind(this));}.bind(this));}});var EmbedPlayer=new Class({initialize:function(playerTarget,iFramePath,ooyalaOptions){this.iFramePath=iFramePath;this.ooyalaOptions=new Hash(ooyalaOptions);this.playerTargets=document.getElements(playerTarget);this.playerTargets.each(function(item,index){var myOoyalaOptions=this.ooyalaOptions;var embedCode=item.getProperty("html");myOoyalaOptions.embedCode=embedCode;item.empty();var myIframe=IFrame({src:this.iFramePath+"?"+myOoyalaOptions.toQueryString(),frameborder:"0",scrolling:"no",name:"iframe0"+index,styles:{width:640,height:360}});myIframe.inject(item);}.bind(this));}});var ExternalLinks=new Class({initialize:function(items,type){if($type(document.getElement(items))){this.myItems=document.getElements(items);this.myItems.each(function(item,index){item.addEvent("click",function(e){e.stop();if(type==="external"){confirmExtLegal(item.href);}else{if(type==="download"){confirmLegal(item.href);}else{window.open(item.href);}}}.bind(this));}.bind(this));}}});var Fademenu=new Class({initialize:function(containerId,items,onHex){this.myContainer=$(containerId);this.myItems=this.myContainer.getElements(items);this.onHex=onHex;this.myItems.each(function(item){var myFxIn=new Fx.Tween(item,{duration:200});var myFxOut=new Fx.Tween(item,{duration:700});var startHex=item.getStyle("color");item.addEvent("mouseenter",function(e){myFxOut.cancel();myFxIn.start("color",this.onHex);}.bind(this));item.addEvent("mouseleave",function(e){myFxIn.cancel();myFxOut.start("color",startHex);}.bind(this));}.bind(this));}});var Commenting=new Class({initialize:function(containerId,triggerId,flag){this.container=$(containerId);this.myTrigger=$(triggerId);this.wrapper=this.container.getElement(".wrapper");this.myClose=this.container.getElement(".close");this.mySubmit=this.container.getElement(".submit");this.myTextarea=this.container.getElement("textarea");this.myAlert=this.container.getElement(".alert");this.myForm=this.container.getElement("form");this.myAccount=this.container.getElement("#accountId");this.myFlag=document.getElements(flag);this.returnTo=encodeURIComponent(document.location);if($("gus_login_link")){this.myLoginLink=$("gus_login_link").get("href")+"&surl="+this.returnTo;}else{this.myLoginLink="https://profile.integration.ea.com/login.do?selectprofile=true&registrationSource=easportsactive&locale=en_US&surl="+this.returnTo;}this.loginNotice='You must <a href="'+this.myLoginLink+'">login before you can comment</a>.';this.myTextareaDefault=this.myTextarea.value;this.myFx1=new Fx.Tween(this.container,{duration:500});this.myFx2=new Fx.Tween(this.wrapper,{duration:500});this.myFx3=new Fx.Tween(this.myTrigger,{duration:250});this.wrapper.setStyle("opacity","0");this.myTrigger.addEvent("click",function(e){this.myFx3.start("opacity","0").chain(function(){this.myFx1.start("height","269px").chain(function(){this.myFx2.start("opacity","1");if((!this.myAccount.value)||(this.myAccount.value=="")||(this.myAccount.value=="undefined")){this.sendAlert(this.loginNotice);}}.bind(this));}.bind(this));e.stop();}.bind(this));this.myClose.addEvent("click",function(e){this.closePane();e.stop();}.bind(this));this.myTextarea.addEvent("focus",function(e){if(this.myTextarea.value==this.myTextareaDefault){this.myTextarea.value="";}}.bind(this));this.myTextarea.addEvent("blur",function(e){if(this.myTextarea.value==""){this.myTextarea.value=this.myTextareaDefault;}}.bind(this));this.mySubmit.addEvent("click",function(e){e.stop();this.submitComments();}.bind(this));this.myFlag.each(function(item){var a=item.getElement("a");a.addEvent("click",function(e){e.stop();this.flagComments(item);}.bind(this));}.bind(this));},submitComments:function(){if((!this.myAccount.value)||(this.myAccount.value=="")||(this.myAccount.value=="undefined")){this.sendAlert(this.loginNotice);}else{if((this.myTextarea.value==this.myTextareaDefault)||(this.myTextarea.value=="")){this.sendAlert("You must enter a comment before you submit.",3000);}else{this.sendAlert("Submitting comments...",3000);this.myForm.set("send",{method:"get",onSuccess:function(response){this.sendAlert("Your comments have been submitted.",1000);this.closePane.delay(1000,this,true);}.bind(this),onFailure:function(response){this.sendAlert("Sorry, there has been a problem submitting your comments.",30000);}.bind(this)});this.myForm.send();}}},sendAlert:function(alertText,timeout){if(!timeout){timeout=1000000;}var myFx1=new Fx.Tween(this.myAlert,{duration:350});this.myAlert.setStyle("opacity","0");this.myAlert.innerHTML=alertText;myFx1.start("opacity","1").chain(function(){(function(){myFx1.start("opacity","0");}).delay(timeout);});},closePane:function(preventReopen){this.myFx2.start("opacity","0").chain(function(){this.myFx1.start("height","0px").chain(function(){if(!preventReopen){this.myFx3.start("opacity","1");}}.bind(this));}.bind(this));},flagComments:function(item){var a=item.getElement("a");new Request({url:a.href,onRequest:function(){item.innerHTML="Flagging comment";},onSuccess:function(){item.innerHTML="Comment flagged";},onFailure:function(){item.innerHTML="There has been a problem";}}).send();},refreshPage:function(){document.location.href=document.location.href;}});var Locale=new Class({initialize:function(options){this.myOptions=options;this.myContainer=$(this.myOptions.containerId);this.myItems=this.myContainer.getElements(this.myOptions.localeItems);this.myRedirects=this.myOptions.redirectArray;this.cookieName=this.myOptions.cookieName;this.myOverlay=this.myOptions.overlayRef;this.myTrigger=$(this.myOptions.triggerId);if(Cookie.read(this.cookieName)){var currentLocale=Cookie.read(this.cookieName);if($type(this.myTrigger)){this.myTrigger.className=currentLocale;}if(this.myRedirects[currentLocale]){var redirect=this.myRedirects[currentLocale];omniLinkCall(this,"locale-autoredirect-"+currentLocale);if((currentLocale!="enCA")||(currentLocale!="enUS")){this.myOverlay.showOverlay();}}}else{this.myOverlay.showOverlay();}this.setupLinks();},setupLinks:function(){this.myItems.each(function(item){item.addEvent("click",function(e){e.stop();var currentLocale=item.className;omniLinkCall(this,"locale-select-"+currentLocale);var myCookie=Cookie.write(this.cookieName,currentLocale,{duration:28});if((currentLocale=="enCA")||(currentLocale=="enUS")){s_ea.pageName="GLOBAL:NONE:SPORTS:EAC:MKT:4330:4330:4330:"+trackCurrentPage.toUpperCase();s_ea.prop11="NA";buildContentType("Mixed","Game Information::Overview",trackCurrentPage);}if(this.myRedirects[currentLocale]){var redirect=this.myRedirects[currentLocale];window.location=redirect;}else{this.myTrigger.className=currentLocale;this.myOverlay.closeOverlay();}}.bind(this));}.bind(this));}});var readRSS=new Class({initialize:function(feedURL,targetID,max){this.feedURL=feedURL;this.myTarget=$(targetID);this.myMax=max;this.myFx=new Fx.Tween(this.myTarget,{duration:250});this.loadFeed();},loadFeed:function(){var myAjax=new Request({url:this.feedURL,noCache:true,onRequest:function(){this.setStatus("Loading feed...");}.bind(this),onSuccess:function(responseTree,responseXML){this.writeFeed(myAjax);}.bind(this),onFailure:function(data){this.setStatus("There was a problem loading the feed.");}.bind(this)}).send();},setStatus:function(msg){this.myTarget.empty();this.myTarget.setProperty("html",'<p class="error">'+msg+"</p>");},writeFeed:function(responseXML){this.myTarget.empty();var ul=new Element("ul");ul.inject(this.myTarget);var items=responseXML.response.xml.getElementsByTagName("item");for(i=0;i<items.length;i++){if(i<this.myMax){var postHdr=items[i].getElementsByTagName("title")[0].firstChild.data;var postUser=items[i].getElementsByTagName("author")[0].firstChild.data.replace("cem_ea_id.","");var postDate=new Date(items[i].getElementsByTagName("pubDate")[0].firstChild.data).format("%B %d, %Y");var postHref=items[i].getElementsByTagName("link")[0].firstChild.data;new Element("li",{html:'<h3><a href="'+postHref+'" onclick="simplePopup(this.href); return false;">'+postHdr+"</a></h3><p><strong>"+postUser+"</strong> | "+postDate+"</p>"}).inject(ul);}}new Element("a",{"class":"more",href:responseXML.response.xml.getElementsByTagName("link")[0].firstChild.data,html:"Read more",events:{click:function(e){e.stop();window.open(this.href);omniLinkCall(this,"community-forums-more");}}}).inject(this.myTarget);}});window.addEvent("domready",function(){var myQuickNav=new quickNav("quickNav","hover");var gusNavEAMenu=new quickNav("gus_ea");if(loggedinMenuActive){var gusNavWelcomeMenu=new quickNav("gus_welcome");}});