var Recruiting = function () {
   return {
      interTimer: 0,
      actPage: -1,
      activcEffect: {},
      backgroundAry: [],
      backgroundHeightAry: [],
      levelIndex: '',
      effectFact: 1,
      init: function () {
         Prototype.Browser.IE6 = Prototype.Browser.IE && parseInt(navigator.userAgent.substring(navigator.userAgent.indexOf("MSIE")+5)) == 6;
         Prototype.Browser.IE7 = Prototype.Browser.IE && parseInt(navigator.userAgent.substring(navigator.userAgent.indexOf("MSIE")+5)) == 7;

      },
   
      /* #####################################################################################*/
      /* ####   animateText                                                        ####*/
      /* #####################################################################################*/

      animateTextGetBgArray: function (AnimateText) { 
         this.animateTextPartContGetBgArray($(AnimateText).childElements()[0], 0);
      },

      animateTextPartContGetBgArray: function (AnimateTextMainCont, animateTextPartContAryIndex) {
         var animateTextPartContAry = AnimateTextMainCont.childElements(); // [<div class="animateTextPartCont">]
         var numberOfAnimateTextPartCont = animateTextPartContAry.length;
         if (animateTextPartContAryIndex < numberOfAnimateTextPartCont) { 
            this.animateTextStepGetBgArray(AnimateTextMainCont, animateTextPartContAryIndex, 1);
         } 
      },      

      animateTextStepGetBgArray: function (AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex) {
         var animateTextStepAry = 
         AnimateTextMainCont.childElements()[animateTextPartContAryIndex].childElements();
         var obj = animateTextStepAry[0];
         var imageSrc = obj.getStyle('backgroundImage');
         var imageHeightObjImg = obj.getStyle('height');         
         //alert(imageHeightObjImg+imageSrc);
         var numberOfAnimateTextStep = animateTextStepAry.length;
         if (animateTextStepAryIndex < numberOfAnimateTextStep) { 
            this.backgroundAry[animateTextPartContAryIndex] = imageSrc;
            this.backgroundHeightAry[animateTextPartContAryIndex] = imageHeightObjImg;
            this.animateTextPartContGetBgArray(AnimateTextMainCont, animateTextPartContAryIndex + 1);
         }
      },

      animateText: function (AnimateText) { 
         this.levelIndex = ''; //'[1,0]';
         $('Recruiting2').removeClassName('animateTextStaticDisplay');
         $('Recruiting2').addClassName('animateTextDynamicDisplay');
         this.animateTextPartCont($(AnimateText).childElements()[0], 0);
      },
    
      animateTextPartCont: function (AnimateTextMainCont, animateTextPartContAryIndex) {
         var animateTextPartContAry = AnimateTextMainCont.childElements(); // [<div class="animateTextPartCont">]
         //alert("animateTextPartContAry="+animateTextPartContAry);
         var numberOfAnimateTextPartCont = animateTextPartContAry.length;
         if (animateTextPartContAryIndex < numberOfAnimateTextPartCont) { 
            if (animateTextPartContAryIndex > 0) {
               animateTextPartContAry[animateTextPartContAryIndex - 1].addClassName('hide');
            } else {
               animateTextPartContAry[numberOfAnimateTextPartCont - 1].addClassName('hide');
            };
            animateTextPartContAry[animateTextPartContAryIndex].removeClassName('hide');
            this.levelIndex += ', [' + 2 + ', ' + animateTextPartContAryIndex + ']';
            this.animateTextStep(AnimateTextMainCont, animateTextPartContAryIndex, 1);
         } else {
            this.animateTextPartCont(AnimateTextMainCont, 0);
         }
      },

      animateTextStep: function (AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex) {
         var animateTextStepAry = 
         AnimateTextMainCont.childElements()[animateTextPartContAryIndex].childElements();
         //alert("animateTextStepAry = "+animateTextStepAry);

         //alert($(obj).readAttribute('src'));
         //alert(imageSrc);
         //alert(animateTextStepAryIndex);
         var numberOfAnimateTextStep = animateTextStepAry.length;
         if (animateTextStepAryIndex < numberOfAnimateTextStep) { 
            this.levelIndex += ', [' + 3 + ', ' + animateTextPartContAryIndex + ', ' + animateTextStepAryIndex + ']';
            if (animateTextStepAryIndex == 1) {
               this.animateTextText(AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex, 0, 1);
            } else {
               this.animateTextTextStep2(AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAry[2].childElements());
            }
         } else {
            this.animateTextPartCont(AnimateTextMainCont, animateTextPartContAryIndex + 1);
         }
      },

      animateTextText: function (AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex, animateTextTextAryIndex, turn) {
         var animateTextTextAry = 
         AnimateTextMainCont.childElements()[animateTextPartContAryIndex].childElements()[animateTextStepAryIndex].childElements();
         var numberOfAnimateTextText = animateTextTextAry.length;
         if (animateTextTextAryIndex < numberOfAnimateTextText) { 
            this.levelIndex += ', [' + 4 + ', ' + animateTextPartContAryIndex + ', ' + animateTextStepAryIndex 
            + ', ' + animateTextTextAryIndex + ']';
            if (animateTextTextAryIndex == 0) {
               this.animateTextTextRow(AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex, animateTextTextAryIndex, 0, turn);
            } else {
               this.animateTextButton(AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex, animateTextTextAry[1], turn);
            }
         } else {
            this.animateTextStep(AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex + 1);
         }
      },

      // turn = 1 -> FadeIn, turn = 2 -> FadeOut   
      animateTextTextRow: function (AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex, animateTextTextAryIndex, animateTextTextRowAryIndex, turn) {
         var animateTextTextRowAry = 
         AnimateTextMainCont.childElements()[animateTextPartContAryIndex].childElements()[animateTextStepAryIndex].childElements()[animateTextTextAryIndex].childElements();
         var numberOfAnimateTextTextRow = animateTextTextRowAry.length;
         if (animateTextTextRowAryIndex < numberOfAnimateTextTextRow) { 
            this.levelIndex += ', [' + 5 + ', ' + animateTextPartContAryIndex + ', ' + animateTextStepAryIndex 
            + ', ' + animateTextTextAryIndex + ', ' + animateTextTextRowAryIndex + ']';
            this.animateTextTextRowDiv(AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex, animateTextTextAryIndex, animateTextTextRowAryIndex, turn);
         } else {
            this.animateTextText(AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex, animateTextTextAryIndex + 1, turn);
         }
      },

      animateTextButton: function (AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex, obj, turn) {
         if (turn == 1) {
            this.animateTextButtonDiv(AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex, obj);
         } else {
            this.animateTextButtonDivFadeOut(AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex, obj);
         }         
      },

      animateTextTextRowDiv: function (AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex, animateTextTextAryIndex, animateTextTextRowAryIndex, turn) {
         var animateTextTextRowAry = 
         AnimateTextMainCont.childElements()[animateTextPartContAryIndex].childElements()[animateTextStepAryIndex].childElements()[animateTextTextAryIndex].childElements();
         var numberOfAnimateTextTextRow = animateTextTextRowAry.length;
         if (animateTextTextRowAryIndex < numberOfAnimateTextTextRow) { 
            this.levelIndex += ', [' + 6 + ', ' + animateTextPartContAryIndex + ', ' + animateTextStepAryIndex 
            + ', ' + animateTextTextAryIndex + ', ' + animateTextTextRowAryIndex + ' div '+ ']';
            obj = animateTextTextRowAry[animateTextTextRowAryIndex];
            if (turn == 1) {
               this.animateTextDivSlide(AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex, animateTextTextAryIndex, animateTextTextRowAryIndex, obj);
            } else {
               this.animateTextDivSlideFadeOut(AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex, animateTextTextAryIndex, animateTextTextRowAryIndex, obj);
            }
         } else {
            this.animateTextTextRow(AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex, animateTextTextAryIndex, animateTextTextRowAryIndex + 1, turn);
         }
      },

      /* #####################################################################################*/
      /* ####   animateText - effects step 1 fadeIn                                       ####*/
      /* #####################################################################################*/

      animateTextDivSlide: function (AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex, animateTextTextAryIndex, animateTextTextRowAryIndex, obj) {
         obj.setStyle({
            opacity: '0',
            top: '0'
         });
         obj.removeClassName('hideByVis');
         
         var dur = (1.1) * this.effectFact;
         var dur2 = ((dur/2) / 3) * this.effectFact;
         var dur3 = ((dur/2) - dur2) * this.effectFact;
         var fps = 25;
         var thisRecruiting = this;
         new Effect.Opacity(obj, { 
            duration: dur,
            fps: fps,
            from: 0, 
            to: 1
         });  
         new Effect.Move(obj, { 
            duration: dur2,
            fps: fps,
            x: 0, 
            y: -100, 
            mode: 'relative',
            afterFinish: function () {
               thisRecruiting.animateTextDivAfter(AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex, animateTextTextAryIndex, animateTextTextRowAryIndex)
               new Effect.Move(obj, { 
                  duration: dur3,
                  fps: fps,
                  x: 0, 
                  y: -100, 
                  mode: 'relative',
                  afterFinish: function () {
                  }
               });  
            }
         })
      },

      animateTextButtonDiv: function (AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex, obj) {
         obj.setStyle({
            opacity: '0',
            position: 'relative',
            left: '0',
            top: '-200px'
         }); 
         obj.removeClassName('hideByVis');
         var dur = (1.1) * this.effectFact;
         var del = 0.5;
         var fps = 25;
         var dur2 = (8) * this.effectFact;
         var thisRecruiting = this;
         new Effect.Opacity(obj, { 
            duration: dur,
            delay: del,
            fps: fps,
            from: 0, 
            to: 1,
            afterFinish: function () {
               new Effect.Pulsate(obj, { 
                  duration: dur2,
                  pulses: dur2 / 2,
                  fps: fps,
                  afterFinish: function () {
                     obj.addClassName('hideByVis');
                     thisRecruiting.animateTextButtonAfter(AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex)
                  }
               });           
            }
         });  
      
      },

      /* #####################################################################################*/
      /* ####   animateText - effects step 1 fadeOut                                      ####*/
      /* #####################################################################################*/

      animateTextDivSlideFadeOut: function (AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex, animateTextTextAryIndex, animateTextTextRowAryIndex, obj) {
         obj.setStyle({
            opacity: '0'
         }); 
         
         obj.removeClassName('hideByVis');
         var dur = (0.44) * this.effectFact;
         var dur2 = (0.34) * this.effectFact;
         var dur3 = ((dur) - dur2) * this.effectFact;
         var fps = 25;
         var thisRecruiting = this;         
         new Effect.Opacity(obj, { 
            delay: 0,
            duration: dur,
            fps: fps,
            from: 1, 
            to: 0,
            afterFinish: function () {
               obj.addClassName('hideByVis');
            }
         });  
         new Effect.Move(obj, { 
            delay: 0,
            duration: dur2,
            fps: fps,
            x: 0, 
            y: -100, 
            mode: 'relative',
            afterFinish: function () {
               //var dur3 = (0.1) * thisRecruiting.effectFact;
               thisRecruiting.animateTextDivAfterFadeOut(AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex, animateTextTextAryIndex, animateTextTextRowAryIndex);
               new Effect.Move(obj, { 
                  delay: 0,
                  duration: dur3,
                  fps: fps,
                  x: 0, 
                  y: -100, 
                  mode: 'relative'
               });  
            }
         })         
      },

      animateTextButtonDivFadeOut: function (AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex, obj) {
         obj.setStyle({
            opacity: '1'
         }); 
         var dur = (0.1) * this.effectFact;
         var fps = 25;
         var thisRecruiting = this;  
         new Effect.Opacity(obj, { 
            duration: dur,
            fps: fps,
            from: 1, 
            to: 0,
            afterFinish: function () {
               obj.addClassName('hideByVis');
               thisRecruiting.animateTextButtonAfterFadeOut(AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex)
            }
         });  
      },

      animateTextDivAfter: function (AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex, animateTextTextAryIndex, animateTextTextRowAryIndex) {
         this.animateTextTextRowDiv(AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex, animateTextTextAryIndex, animateTextTextRowAryIndex + 1, 1);
      },

      animateTextButtonAfter: function (AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex) {
         this.animateTextText(AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex, 0, 2);
      },
      
      animateTextDivAfterFadeOut: function (AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex, animateTextTextAryIndex, animateTextTextRowAryIndex) {
         this.animateTextTextRowDiv(AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex, animateTextTextAryIndex, animateTextTextRowAryIndex + 1, 2);
      },

      animateTextButtonAfterFadeOut: function (AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex) {
         this.animateTextStep(AnimateTextMainCont, animateTextPartContAryIndex, animateTextStepAryIndex + 1);
      },
      
      /* #####################################################################################*/
      /* ####   animateText - effects step 2 fadeIn                                       ####*/
      /* #####################################################################################*/
      
      animateTextTextStep2: function (AnimateTextMainCont, animateTextPartContAryIndex, objAry) {
         obj1 = objAry[0];
         obj2 = objAry[1];
         obj1.setStyle({
            opacity: '0'
         }); 
         obj2.setStyle({
            opacity: '0'
         }); 
         
         obj1.removeClassName('hideByVis');   
         obj2.removeClassName('hideByVis');   
    
         var dur = (0.7) * this.effectFact;
         var dur2 = (0.3) * this.effectFact;
         var fps = 25;
         var thisRecruiting = this;
         new Effect.Opacity(obj1, { 
            duration: dur,
            fps: fps,
            from: 0, 
            to: 1,
            afterFinish: function () {
               new Effect.Opacity(obj2, { 
                  duration: dur2,
                  from: 0, 
                  to: 1,
                  afterFinish: function () {
                     thisRecruiting.animateTextTextStep2Fadeout(AnimateTextMainCont, animateTextPartContAryIndex, objAry)
                  }
               });
            }
         });  
        
      },

      /* #####################################################################################*/
      /* ####   animateText - effects step 2 fadeOut                                      ####*/
      /* #####################################################################################*/

      animateTextTextStep2Fadeout: function (AnimateTextMainCont, animateTextPartContAryIndex, objAry) {
         obj1 = objAry[0]; // animateTextStep2TopText
         obj2 = objAry[1]; // animateTextStep2TextButton
         obj1.setStyle({
            opacity: '1'
         }); 
         obj2.setStyle({
            opacity: '1'
         });          
         var dur = (0.6) * this.effectFact;
         var dur2 = (0.4) * this.effectFact;
         var del = (4.5) * this.effectFact;
         var fps = 25;
         var thisRecruiting = this;
         new Effect.Opacity(obj1, { 
            duration: dur,
            delay: del,
            fps: fps,
            from: 1, 
            to: 0,
            afterFinish: function () {
               new Effect.Opacity(obj2, { 
                  duration: dur2,
                  from: 1, 
                  to: 0,
                  afterFinish: function () {
                     obj2.addClassName('hideByVis');
                     thisRecruiting.animateBgFadeOutFadeIn(AnimateTextMainCont, animateTextPartContAryIndex);
                  }
               });
            }
         });  
      },
      
      animateBgFadeOutFadeIn: function (AnimateTextMainCont, animateTextPartContAryIndex) {
         var animateTextPartContAry = AnimateTextMainCont.childElements(); 
         var numberOfAnimateTextPartCont = animateTextPartContAry.length;
         var nextAnimateTextPartContAryIndex = animateTextPartContAryIndex + 1;
         if (nextAnimateTextPartContAryIndex == numberOfAnimateTextPartCont) { 
            nextAnimateTextPartContAryIndex = 0;
         };
         obj = $('Recruiting2Bg2');
         obj.setStyle({
            opacity: '1'
         }); 

         var imgSrc2 = this.backgroundAry[nextAnimateTextPartContAryIndex];

         $('Recruiting2Bg1').setStyle({
            backgroundImage: imgSrc2
         })
         var dur = (1.5) * this.effectFact;
         var fps = 25;
         var thisRecruiting = this;
         new Effect.Opacity(obj, { 
            duration: dur,
            fps: fps,
            from: 1, 
            to: 0,
            afterFinish: function () {
               $('Recruiting2Bg2').setStyle({
                  backgroundImage: imgSrc2
               });
               thisRecruiting.animateTextPartCont(AnimateTextMainCont, animateTextPartContAryIndex + 1);
            }
         }); 
         this.animateTextFirstRound = false;
      },      

      /* #####################################################################################*/
      /* ####   animateText END                                                           ####*/
      /* #####################################################################################*/

      setBgMarginTop: function () {
         /*
         $('LoMainNav').setStyle({
            height: '40px',
            minHeight: '40px'
         }); 
          */
         $('LoMainContent').setStyle({
            marginTop: '0'
         }); 
         var noBorderBox = $$('div.noBorderBox')[0];
         $(noBorderBox).setStyle({
            margin: '-5px 0 0 0',
            width: 'auto'
           
         }); 
      },      


      animateBgFadeIn: function () {
      
         this.setBgMarginTop();        
         var obj = $('Recruiting2Bg1');
         obj.setStyle({
            opacity: '0'
         }); 
         /*  
         var objVl = $$('ul.videoList');
         objVl.each(function(element) {
            element.removeClassName('hide');
         }); 
          */
         $('VideoLeft').removeClassName('hide');
         $('videoMain').removeClassName('hide');
         $('Recruiting2Bg2').removeClassName('hide');
         var imgSrc = this.backgroundAry[0];
         var imageHeightObjImg = this.backgroundHeightAry[0];
         
         $('Recruiting2Bg2').setStyle({
            //backgroundImage: imgSrc,
            minHeight: imageHeightObjImg
         });
         
         $('Recruiting2Bg1').setStyle({
            backgroundImage: imgSrc,
            minHeight: imageHeightObjImg
         });         
         $('Recruiting1').setStyle({
            minHeight: imageHeightObjImg
         });  
         $('Recruiting2').setStyle({
            minHeight: imageHeightObjImg
         });  

         if (Prototype.Browser.IE6) {
            $('Recruiting2Bg1').setStyle({
               height: imageHeightObjImg
            });
            $('Recruiting2Bg2').setStyle({
               height: imageHeightObjImg
            });
            $('Recruiting1').setStyle({
               height: imageHeightObjImg
            });  
            $('Recruiting2').setStyle({
               height: imageHeightObjImg
            });
         }
         var dur = (1) * this.effectFact;
         var fps = 25;
         new Effect.Opacity(obj, { 
            duration: dur,
            fps: fps,
            from: 0, 
            to: 1,
            afterFinish: function () {
               $('Recruiting2Bg1').removeClassName('backgr00');
               $('Recruiting2Bg1').setStyle({
                  minHeight: imageHeightObjImg
               });
               $('Recruiting2Bg2').setStyle({
                  backgroundImage: imgSrc
               });
            }
         }); 
      },      

      animateBgFadeIn2: function () {
         this.setBgMarginTop();         
         obj = $('RecruitingBg2');
         obj.setStyle({
            opacity: '0'
         }); 
         obj.removeClassName('hide');
         var objImg = obj.childElements()[0];
         var imageSrcObjImg = $(objImg).getStyle('backgroundImage');
         var imageHeightObjImg = $(objImg).getStyle('height');
         obj.setStyle({
            backgroundImage: imageSrcObjImg,
            minHeight: imageHeightObjImg
         });
         $('RecruitingBg2').setStyle({
            backgroundImage: imageSrcObjImg,
            minHeight: imageHeightObjImg
         });
         $('Recruiting').setStyle({
            minHeight: imageHeightObjImg
         });
         if (Prototype.Browser.IE6) {
            $('RecruitingBg2').setStyle({
               height: imageHeightObjImg
            });
            $('Recruiting').setStyle({
               height: imageHeightObjImg
            });
         }
         var durGes = (1) * this.effectFact;
         var dur1 = (0.2) * this.effectFact;
         var dur2 = (durGes - dur1) * this.effectFact;
         var to = 0.2;
         var fps = 25;
         var thisRecruiting = this;
         new Effect.Opacity(obj, { 
            duration: dur1,
            fps: fps,
            from: 0, 
            to: to,
            afterFinish: function () {
               thisRecruiting.slideContent();
               new Effect.Opacity(obj, { 
                  duration: dur2,
                  fps: fps,
                  from: to, 
                  to: 1
               }); 
            }
         }); 
      },  

      slideContent: function () {
         var obj = $('Slide');
         //var margTop = obj.getStyle('padding-top');
         var objOuterSlideSpace = $('OuterSlideMoveSpace');
         var margTop = obj.getStyle('height');
         margTop = margTop.truncate(margTop.length - 2,'');
         obj.setStyle({
            display: 'none'
         }
         );
         if (Prototype.Browser.IE7) {
            var objAry1 = $('Recruiting').select('div.multicol');
            objAry1.each(function (element) {
               element.addClassName('ie7SlideFix');
            //throw $break;
            })
            var className = '';
            var classNameFirst = '';
            var objAry2 = $('Recruiting').select('div.shadowBoxDContent');
            objAry2.each(function (element) {
               for (var i = 1; i <= 10; i++) {
                  className = 'multicolBgTransparent' + (i*10);
                  if (element.hasClassName(className)) { 
                     classNameFirst = className;
                     break;
                  }
                  className = '';
               }
               element.removeClassName(className); // issue with ie7 -otherwise ie7 is showing gray-colored bg meanwhiles
               element.addClassName('multicolBgTransparent0');
            //throw $break;
            })
            obj.removeClassName('hideByVis');
            var dur1 = (0.9) * this.effectFact;
            var fps = 25;
            new Effect.Appear(obj, {
               delay: 0,
               duration: dur1,
               fps: fps,
               afterFinish: function () {
                  objAry1.each(function (element) {
                     element.removeClassName('ie7SlideFix');
                  })
                  obj.setOpacity(1);
                  objAry2.each(function (element) {
                     element.removeClassName('multicolBgTransparent0'); // issue with ie7 -otherwise ie7 is showing gray-colored bg meanwhiles
                     element.addClassName(classNameFirst);
                  //alert("c2="+className);
                  //throw $break;
                  })
               }
            }); 
            var dur2 = (0.8) * this.effectFact;
            new Effect.Scale(objOuterSlideSpace, 50,{
               duration: dur2,
               fps: fps,
               scaleFrom: 100,
               afterFinish: function () {
                  objOuterSlideSpace.setStyle({
                     display: 'none'
                  }
                  );
               }
            });
         } else
{
            obj.removeClassName('hideByVis');
            var dur1 = (0.8) * this.effectFact;
            var fps = 25;
            new Effect.Appear(obj, {
               delay: 0,
               duration: dur1,
               fps: fps,
               afterFinish: function () {
                  obj.setOpacity(1);
               }
            }); 
            var dur2 = (0.9) * this.effectFact;
            new Effect.Scale(objOuterSlideSpace, 0,{
               duration: dur2,
               fps: fps,
               scaleFrom: 100,
               afterFinish: function () {
                  objOuterSlideSpace.setStyle({
                     display: 'none'
                  }
                  );
               }
            });
         }
      },

      updateMainClasses: function () {
         for (var i = 0; i < 5; ++i) {
            $('MainContentBgPrev').removeClassName('backgr'+i);
            $('MainContent').removeClassName('backgr'+i);
         }
         $('MainContentBgPrev').addClassName('backgr'+this.actPage);
      }, 

      mainFadeIn: function (slide) {
         var dur = (1) * this.effectFact;
         $('MainContent').addClassName('backgr'+this.actPage);
         $('MainContent').setStyle({
            display: 'none',
            opacity: '0'
         });      
         if ((Object.isUndefined(slide) || (slide==true))) {
            Effect.Appear('MainContent', { 
               duration: dur,
               afterFinish: this.mainSlideContent() 
            });
         } else {
            Effect.Appear('MainContent', { 
               duration: dur
            });
         }
      },

      mainSlideContent: function () {
         var dur = (1) * this.effectFact;
         var fps = 25;
         if (this.activeEffect) {
            this.activeEffect.cancel();
         }     
         this.activeEffect = new Effect.Move($('Slide'), {
            delay: 0,
            duration: dur,
            fps: fps,
            x: 0, 
            y: -300, 
            mode: 'relative'
         });
      },

      readMoreStart: function (obj) {
         obj = $(obj); // extends with Element.extend (IE issue) 
         objNext = obj.next(0);
         obj.addClassName('hideTemp');
         objNext.removeClassName('hide');
         objNext.addClassName('showTemp');
      },
      
      readMoreEnd: function (obj) {
         obj = $(obj)
         ObjAncestor = obj.ancestors();
         ObjAncestor[0].removeClassName('showTemp');
         ObjAncestor[0].addClassName('hide');
         objPrev = ObjAncestor[0].previous(0);
         objPrev.removeClassName('hideTemp');
      },  
      
      setBookmark: function(title, url) {
         if (window.sidebar) { // Mozilla Firefox Bookmark
            window.external.addPanel(title, url,"");
         } else if( window.external ) { // IE Favorite
            window.external.AddFavorite( url, title);
         }
         else {
            alert("Ihr Browser unterstützt diese Funktion nicht direkt. Setzen Sie ein Lesezeichen über die die Browsernavigation.");
         }
      }      
   }
};

Recruiting.factory = function () {
   var result = new Recruiting();
   result.init();
   return( result );
};


var recruiting = Recruiting.factory();  



