var ProductListHelper={start:function(){var d=$("startFlyOut");d.setOpacity(0.01);d.show();$("flyoutBoxFirst").down("h1").id="h1_id";new Effect.Fade(d,{duration:1,from:0,to:1,queue:"end"});new Effect.Fade($("flyoutBoxThird"),{duration:1,from:1,to:0,queue:"end"});new Effect.Fade($("flyoutBoxSecond"),{duration:1,from:1,to:0,queue:"end"});new Effect.RemoveText("h1_id",{duration:1,queue:"end"});$("flyoutBoxFirst").down("ul").childElements().each(function(f){Effect.SwitchOff(f,{duration:0.5,queue:"end"})});new Effect.Eval('$("flyoutBoxFirst").down("ul").childElements().each(function(element){element.remove()})',"once",{duration:0.5,queue:"end"});new Effect.Eval('$("flyoutBoxSecond").update("&nbsp;")',"once",{duration:0.5,queue:"end"});new Effect.Eval('$("flyoutBoxThird").setStyle("vertical-align:bottom;text-align:right");$("flyoutBoxThird").update("&nbsp;");',"once",{duration:0.5,queue:"end"});var b=new Array("acz - Project Management","dth - Technical Lead Authority","dgl - Technical Lead","uge - Test Management","fschmidt - Test","cka - Test","mibi - Lead Development","hnes - Development","anre - Development","spietsch - Development","fkr - Builds + Development");new Effect.AddRandomizedText("h1_id","R2 team member",{duration:1,queue:"end"});var c="";for(var a=0;a<b.length;a++){var e="players_"+a;c="$('flyoutBoxFirst').down('ul').insert({bottom: new Element('li', { id: '"+e+"' })})";new Effect.Eval(c,"once",{duration:0.1,queue:"end"});new Effect.AddRandomizedText(e,b[a],{duration:1.2,queue:"end"})}new Effect.RandomizeText("h1_id","R2 team member",{duration:1,queue:"end"});for(var a=0;a<b.length;a++){var e="players_"+a;new Effect.RandomizeText(e,b[a],{duration:1.2,queue:"end"})}new Effect.Appear($("flyoutBoxSecond"),{duration:1,queue:"end"});new Effect.Appear($("flyoutBoxThird"),{duration:1,queue:"end"});new Effect.Eval("$('flyoutBoxThird').insert({bottom: new Element('div', { id: 'seeyouin' })})","once",{duration:0.1,queue:"end"});new Effect.AddRandomizedText("seeyouin","See you in R3?!",{duration:1.2,queue:"end"});new Effect.RandomizeText("seeyouin","See you in R3?!",{duration:1.2,queue:"end"});return},initialize:function(){Effect.RandomizeText=Class.create();Object.extend(Object.extend(Effect.RandomizeText.prototype,Effect.Base.prototype),{initialize:function(elementid,newString){var options=arguments[2]||{};this.elementid=elementid;this.newString=newString;this.newStringArray=this.stringToArray(this.newString);this.newStringArrayLength=this.newStringArray.length;this.tempArray=new Array(this.newStringArrayLength);this.positions=1/this.newStringArrayLength;this.charArray=new Array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z");this.charArrayLength=this.charArray.length;this.initialized=false;this.start(options)},init:function(){this.element=$(this.elementid);this.initialized=true},update:function(position){if(!this.initialized){this.init()}for(var i=0;i<this.newStringArrayLength;i++){if(position<=(this.positions*i)){this.tempArray[i]=this.getRandomChar()}else{this.tempArray[i]=this.newStringArray[i]}}try{this.element.innerHTML=this.arrayToString(this.tempArray)}catch(e){}},getRandomChar:function(){var pos=Math.round(Math.random()*this.charArrayLength);if(pos==this.charArrayLength){pos-=pos}return this.charArray[pos]},stringToArray:function(string){var stringArray=new Array();if(string==null){return stringArray}for(var i=0;i<string.length;i++){stringArray.push(string.charAt(i))}return stringArray},arrayToString:function(array){var string=new String();if(array==null||array.length<1){return string}for(var i=0;i<array.length;i++){string+=array[i]}return string}});Effect.RemoveText=Class.create();Object.extend(Object.extend(Effect.RemoveText.prototype,Effect.Base.prototype),{initialize:function(element){var options=arguments[1]||{};this.element=$(element);this.initialized=false;this.start(options)},init:function(){this.tempArray=this.stringToArray(this.element.innerHTML);this.tempArrayLength=this.tempArray.length;this.initialized=true},update:function(position){if(this.initialized==false){this.init()}if(position>=0.95){this.element.innerHTML="";return}for(var i=this.tempArrayLength;i>0;i--){if((1-position)<=(1-(1/this.tempArrayLength)*i)){this.tempArray[i-1]=""}}try{this.element.innerHTML=this.arrayToString(this.tempArray)}catch(e){}},stringToArray:function(string){var stringArray=new Array();if(string==null){return stringArray}for(var i=0;i<string.length;i++){stringArray.push(string.charAt(i))}return stringArray},arrayToString:function(array){var string=new String();if(array==null||array.length<1){return string}for(var i=0;i<array.length;i++){string+=array[i]}return string}});Effect.AddRandomizedText=Class.create();Object.extend(Object.extend(Effect.AddRandomizedText.prototype,Effect.Base.prototype),{initialize:function(elementid,newString){var options=arguments[2]||{};this.elementid=elementid;this.newString=newString;this.tempArray=new Array(this.newString.length);this.tempArrayLength=this.tempArray.length;this.charArray=new Array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z");this.charArrayLength=this.charArray.length;this.initialized=false;this.start(options)},init:function(){this.element=$(this.elementid);this.initialized=true},update:function(position){if(!this.initialized){this.init()}for(var i=0;i<this.tempArrayLength;i++){if(position>((1/this.tempArrayLength)*i)){this.tempArray[i]=this.getRandomChar()}else{this.tempArray[i]=""}}try{this.element.innerHTML=this.arrayToString(this.tempArray)}catch(e){}},getRandomChar:function(){var pos=Math.round(Math.random()*this.charArrayLength);if(pos==this.charArrayLength){pos-=pos}return this.charArray[pos]},stringToArray:function(string){var stringArray=new Array();if(string==null){return stringArray}for(var i=0;i<string.length;i++){stringArray.push(string.charAt(i))}return stringArray},arrayToString:function(array){var string=new String();if(array==null||array.length<1){return string}for(var i=0;i<array.length;i++){string+=array[i]}return string}});Effect.Eval=Class.create();Object.extend(Object.extend(Effect.Eval.prototype,Effect.Base.prototype),{initialize:function(evalstring,iterations){var options=arguments[2]||{};this.evalstring=evalstring;this.iterations=iterations;this.iteration=0;this.start(options)},update:function(position){try{if(this.iterations=="continuously"){eval(this.evalstring)}else{if(this.iterations=="once"&&this.iteration<1){eval(this.evalstring);this.iteration++}}}catch(e){}}})}};document.observe("dom:loaded",function(){ProductListHelper.initialize()});
