if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;

var Slideshow = new Class({

    initialize: function(slideshow, props) {
        this.props = Object.extend({
            captions: false,
            classes: ['prev', 'next', 'active'],
            duration: [2000, 4000],
            height: false,
            hu: '/',
            images: [],
            navigation: false,
            pan: 100,
            resize: true,
            thumbnailre: [/\./, 't.'],
            transition: Fx.Transitions.sineInOut,
            type: 'fade',
            width: false,
            zoom: 50
        }, props || {});

        if (this.props.images.length <= 1) { return; }

        if (this.props.pan != 'rand') {
            if (isNaN(this.props.pan.toInt()) || this.props.pan.toInt() < 0 || this.props.pan.toInt() > 100) { this.props.pan = 0; }
        }

        if (this.props.zoom != 'rand') {
            if (isNaN(this.props.zoom.toInt()) || this.props.zoom.toInt() < 0 || this.props.zoom.toInt() > 100) { this.props.zoom = 0; }
        }

        this.slideshow = $(slideshow);

        this.a = img = $E('img', this.slideshow);

        this.fx = [];

        this.start();
    },

    start: function() {
        this.slideshow.setHTML('');

        this.a.setStyles({display: 'block', position: 'absolute', left: '0px', top: '0px', zIndex: 1});
        this.a.injectInside(this.slideshow);

        this.fx.each(function(fx) {
            fx.time = fx.options.duration = 0;
            fx.stop(true);
        });

        obj = this.a.getCoordinates();

        this.height = ((this.props.height) ? this.props.height : obj['height']);
        this.width = ((this.props.width) ? this.props.width : obj['width']);

        this.slideshow.setStyles({display: 'block', position: 'relative', width: this.width + 'px'});

        // Images appear within a bounding div inside of the slideshow div
        // This div may be used to attach events - such as myShow.div.onmouseover - in order to show / hide navigation or further manipulate the slideshow
        this.div = new Element('div');
        this.div.setStyles({display: 'block', height: (this.height + 'px'), overflow: 'hidden', position: 'relative', width: (this.width + 'px')});
        this.div.injectInside(this.slideshow);

        this.a.injectInside(this.div);

        if ((this.props.height || this.props.width) && this.props.resize) {
            dh = this.height / obj['height'];
            dw = this.width / obj['width'];

            n = (dw > dh) ? dw : dh;

            this.a.setStyles({height: Math.ceil(obj['height'] * n) + 'px', width: Math.ceil(obj['width'] * n) + 'px'});
        }

        this.b = this.a.clone();
        this.b.setStyle('opacity', 0);
        this.b.injectAfter(this.a);

        if (this.props.navigation) { this.navigation(); }

        if ($type(this.props.captions) == 'array') {
            this.p = new Element('p');
            this.p.setHTML(this.props.captions[0]);
            this.p.injectInside(this.slideshow);
        }

        this.direction = 'left';
        this.curr = [1, 1];
        this.timer = (this.timer) ? [0] : [(new Date).getTime() + this.props.duration[1], 0];

        this.loader = new Image();
        this.loader.src = this.props.hu + this.props.images[this.curr[0]].trim();

        this.preload();
    },

    preload: function(fast) {
        if (this.loader.complete && ((new Date).getTime() > this.timer[0])) {
            img = (this.curr[1] % 2) ? this.b : this.a;
            img.setStyles({height: 'auto', opacity: 0, width: 'auto', zIndex: this.curr[1]});
            img.setProperty('src', this.loader.src);

            dh = this.height / this.loader.height;
            dw = this.width / this.loader.width;

            n = (dw > dh) ? dw : dh;

            if (this.props.resize) { img.setStyles({height: Math.ceil(this.loader.height * n) + 'px', width: Math.ceil(this.loader.width * n) + 'px'}); }

            if (fast) {
                img.setStyles({left: '0px', opacity: 1, top: '0px'});
                if ($type(this.props.captions) == 'array') { this.p.setHTML(this.props.captions[this.curr[0]]).setStyle('opacity', 1); }
                return this.loaded();
            }

            this.fx = [];

            if ($type(this.props.captions) == 'array') {
                fn = function(i) {
                    if (this.props.captions[i]) { this.p.setHTML(this.props.captions[i]); }

                    fx = new Fx.Style(this.p, 'opacity');
                    fx.start(0, 1);
                    this.fx.push(fx);
                }.pass(this.curr[0], this);

                fx = new Fx.Style(this.p, 'opacity', {onComplete: fn});
                fx.start(1, 0);
                this.fx.push(fx);
            }

            if (this.props.type.test(/push|wipe/)) {
                img.setStyles({left: 'auto', right: 'auto'});
                img.setStyle(this.direction, this.width + 'px');
                img.setStyle('opacity', 1);

                if (this.props.type == 'wipe') {
                    fx = new Fx.Style(img, this.direction, {duration: this.props.duration[0], transition: this.props.transition});
                    fx.start(this.width, 0);
                    this.fx.push(fx);
                }
                else {
                    arr = [img, ((this.curr[1] % 2) ? this.a : this.b)];

                    p0 = {};
                    p0[this.direction] = [this.width, 0];
                    p1 = {};
                    p1[this.direction] = [0, (this.width * -1)];

                    // Navigation has changed direction
                    // The image shifts when changing from right <> left so we need to correct the positioning
                    if (arr[1].getStyle(this.direction) == 'auto') {
                        x = this.width - arr[1].getStyle('width').toInt();

                        arr[1].setStyle(this.direction, x + 'px');
                        arr[1].setStyle(((this.direction == 'left') ? 'right' : 'left'), 'auto');

                        p1[this.direction] = [x, (this.width * -1)];
                    }

                    fx = new Fx.Elements(arr, {duration: this.props.duration[0], transition: this.props.transition});
                    fx.start({'0': p0, '1': p1});
                    this.fx.push(fx);
                }
            }
            else {
                img.setStyles({bottom: 'auto', left: 'auto', right: 'auto', top: 'auto'});

                arr = ['left top', 'right top', 'left bottom', 'right bottom'][this.curr[1] % 4].split(' ');
                arr.each(function(p) { img.setStyle(p, 0); });

                zoom = ((this.props.type).test(/zoom|combo/)) ? this.zoom() : {};

                pan = ((this.props.type).test(/pan|combo/)) ? this.pan() : {};

                fx = new Fx.Style(img, 'opacity', {duration: this.props.duration[0]});
                fx.start(0, 1);
                this.fx.push(fx);

                fx = new Fx.Styles(img, {duration: (this.props.duration[0] + this.props.duration[1]), transition: Fx.Transitions.linear});
                fx.start(Object.extend(zoom, pan));
                this.fx.push(fx);
            }

            this.loaded();
        }
        else { this.timeout = this.preload.delay(100, this); }
    },

    loaded: function() {
        if (this.ul) {
            anchors = $ES('a[name]', this.ul);
            anchors.each(function(a, i) {
                if (i == this.curr[0]) { a.addClass(this.props.classes[2]); }
                else { a.removeClass(this.props.classes[2]); }
            }, this);
        }

        this.direction = 'left';
        this.curr[0] = (this.curr[0] == this.props.images.length - 1) ? 0 : this.curr[0] + 1;
        this.curr[1]++;
        this.timer[0] = (new Date).getTime() + this.props.duration[1] + ((this.props.type.test(/fade|push|wipe/)) ? this.props.duration[0] : 0);
        this.timer[1] = (new Date).getTime() + this.props.duration[0];

        this.loader = new Image();
        this.loader.src = this.props.hu + this.props.images[this.curr[0]].trim();

        this.preload();
    },

    zoom: function() {
        z = (this.props.zoom == 'rand') ? Math.random() + 1 : (this.props.zoom.toInt() / 100.0) + 1;

        eh = Math.ceil(this.loader.height * n);
        ew = Math.ceil(this.loader.width * n);

        sh = parseInt(eh * z);
        sw = parseInt(ew * z);

        return {height: [sh, eh], width: [sw, ew]};
    },

    pan: function() {
        p = (this.props.pan == 'rand') ? Math.random() : Math.abs((this.props.pan.toInt() / 100.0) - 1);

        ex = (this.width - img.width);
        ey = (this.height - img.height);

        sx = parseInt(ex * p);
        sy = parseInt(ey * p);

        obj = {};

        if (dw > dh) { obj[arr[1]] = [sy, ey] }
        else { obj[arr[0]] = [sx, ex]; }

        return obj;
    },

    navigation: function() {
        this.ul = new Element('ul');

        if (this.props.navigation.test(/arrows/)) {
            li = new Element('li');

            a = new Element('a');
            a.addClass(this.props.classes[0]);
            a.onclick = function() {
                if (this.props.navigation.test(/fast/) || (new Date).getTime() > this.timer[1]) {
                    $clear(this.timeout);

                    // Clear the FX array only for fast navigation since this stops combo effects
                    if (this.props.navigation.test(/fast/)) {
                        this.fx.each(function(fx) {
                            fx.time = fx.options.duration = 0;
                            fx.stop(true);
                        });
                    }

                    this.direction = 'right';
                    this.curr[0] = (this.curr[0] < 2) ? this.props.images.length - (2 - this.curr[0]) : this.curr[0] - 2;
                    this.timer = [0];

                    this.loader = new Image();
                    this.loader.src = this.props.hu + this.props.images[this.curr[0]].trim();

                    this.preload(this.props.navigation.test(/fast/));
                }
            }.bind(this);
            a.injectInside(li);

            li.injectInside(this.ul);
        }

        if (this.props.navigation.test(/arrows\+|thumbnails/)) {
            for (i = 0; i < this.props.images.length; i++) {
                li = new Element('li');

                a = new Element('a');
                a.setProperty('name', i);
                if (this.props.navigation.test(/thumbnails/)) {
                    src = this.props.hu + this.props.images[i].trim().replace(this.props.thumbnailre[0], this.props.thumbnailre[1]);
                    a.setStyle('background-image', 'url(' + src + ')');
                }
                if (i == 0) { a.className = this.props.classes[2]; }
                a.onclick = function(i) {
                    if (this.props.navigation.test(/fast/) || (new Date).getTime() > this.timer[1]) {
                        $clear(this.timeout);

                        // Clear the FX array only for fast navigation since this stops combo effects
                        if (this.props.navigation.test(/fast/)) {
                            this.fx.each(function(fx) {
                                fx.time = fx.options.duration = 0;
                                fx.stop(true);
                            });
                        }

                        this.direction = (i < this.curr[0] || this.curr[0] == 0) ? 'right' : 'left';
                        this.curr[0] = i;
                        this.timer = [0];

                        this.loader = new Image();
                      this.loader.src = this.props.hu + this.props.images[this.curr[0]].trim();

                        this.preload(this.props.navigation.test(/fast/));
                    }
                }.pass(i, this);
                a.injectInside(li);

                li.injectInside(this.ul);
            }
        }

        if (this.props.navigation.test(/arrows/)) {
            li = new Element('li');

            a = new Element('a');
            a.addClass(this.props.classes[1]);
            a.onclick = function() {
                if (this.props.navigation.test(/fast/) || (new Date).getTime() > this.timer[1]) {
                    $clear(this.timeout);

                    // Clear the FX array only for fast navigation since this stops combo effects
                    if (this.props.navigation.test(/fast/)) {
                        this.fx.each(function(fx) {
                            fx.time = fx.options.duration = 0;
                            fx.stop(true);
                        });
                    }

                    this.timer = [0];

                    this.preload(this.props.navigation.test(/fast/));
                }
            }.bind(this);
            a.injectInside(li);

            li.injectInside(this.ul);
        }

        this.ul.injectInside(this.slideshow);
    }
});

var Site = {
    start: function(){
        if ($('flash_intro')) {
            Site.introFlash();
        }
        if ($('historie')) {
            Site.makeHistorieMenu();
        }
        if ($('history')) {
            Site.makeHistorieMenu();
        }
        if ($('produkte_slideshow')) {
            Site.produkteSlideshow();
        }
        if ($('products_slideshow')) {
            Site.produkteSlideshowEn();
        }
        if ($('qualitaet_slideshow')) {
            Site.qualitaetSlideshow();
        }
        if ($('umweltbericht_slideshow')) {
            Site.umweltberichtSlideshow();
        }
    },

    introFlash: function(){
        var so = new SWFObject("../flash/intro.swf", "intro", "798", "480", "6", "#FFFFFF")
        so.write("flash_intro")
    },
    
    produkteSlideshow: function(){
        var myShow = new Slideshow('produkte_slideshow', {hu: '../../images/produkte/', resize: 'false', height: '373', width: '798', duration:[1500, 4000], images: ['p1.jpg','p2.jpg','p3.jpg','p4.jpg','p5.jpg','p6.jpg','p7.jpg','p8.jpg','p9.jpg', 'p10.jpg', 'p11.jpg', 'p12.jpg', 'p13.jpg', 'p14.jpg'], captions: ['Flache Stanzteile','Stanzbiege-, Tiefzieh- und Prägeteile',        'Stanzbiege-, Tiefzieh- und Prägeteile','Stanzbiege-, Tiefzieh- und Prägeteile','Stanzbiege-, Tiefzieh- und Prägeteile','Stanzbiege-, Tiefzieh- und Prägeteile','Stanzbiege-, Tiefzieh- und Prägeteile','Stanzbiege-, Tiefzieh- und Prägeteile','Stanzbiege-, Tiefzieh- und Prägeteile','Stanzbiege-, Tiefzieh- und Prägeteile','Stanzbiege-, Tiefzieh- und Prägeteile','Unterlegscheiben und Sonderscheiben','Unterlegscheiben und Sonderscheiben','Unterlegscheiben und Sonderscheiben'], navigation: 'thumbnails'}); 
    },
    produkteSlideshowEn: function(){
        var myShow = new Slideshow('products_slideshow', {hu: '../../images/produkte/', resize: 'false', height: '373', width: '798', duration:[1500, 4000], images: ['p1.jpg','p2.jpg','p3.jpg','p4.jpg','p5.jpg','p6.jpg','p7.jpg','p8.jpg','p9.jpg', 'p10.jpg', 'p11.jpg', 'p12.jpg', 'p13.jpg', 'p14.jpg'], captions: ['Flat stamped parts','Punched, deep-drawn and formed parts',        'Punched, deep-drawn and formed parts','Punched, deep-drawn and formed parts','Punched, deep-drawn and formed parts','Punched, deep-drawn and formed parts','Punched, deep-drawn and formed parts','Punched, deep-drawn and formed parts','Punched, deep-drawn and formed parts','Punched, deep-drawn and formed parts','Punched, deep-drawn and formed parts','Plain and special washers','Plain and special washers','Plain and special washers'], navigation: 'thumbnails'});
    },
    qualitaetSlideshow: function() { myShow = new Slideshow('qualitaet_slideshow', {hu: '../../images/qualitaet/',type: 'fade', images: ['p1.jpg','p2.jpg'], navigation: 'thumbnails'}); },
    
    umweltberichtSlideshow: function() { myShow = new Slideshow('umweltbericht_slideshow', {hu: '../../images/umweltbericht/',type: 'fade', images: ['p1.jpg','p2.jpg'], navigation: 'thumbnails'}); },
    
    makeHistorieMenu: function() {
        var historiehash = new Hash({
            h1960: '<p>Gründung der Firma Otto Bauckhage Metallwarenfabrik,<br>durch Otto Bauckhage. Firmensitz in Friedlin bei Herscheid, Schmiedeweg 12.</p>',
            h1961: '<p>Eintritt von Hans Werner Bauckhage als Angestellter<br> in die Firma.</p>',
            h1965: '<p>Kauf eines Grundstücks in Herscheid, Müggenbrucher<br> Weg und Baubeginn für eine Fabrikhalle.<br>Übernahme der Firma durch Hans Werner Bauckhage.</p>',
            h1966: '<p>Umzug von Friedlin in das neue Gebäude in Herscheid,<br> Müggenbrucher Weg.</p>',
            h1970: '<p>Errichtung der Halle 2 für Werkzeugbau und Rohmateriallager.</p>',
            h1978: '<p>Umfirmierung in eine GmbH + Co.KG</p>',
            h1979: '<p>Errichtung der Halle 3 für Versand und Lager</p>',
            h1984: '<p>Kauf verschiedener angrenzender Grundstücke<br> im Norden und Westen des Firmengeländes für<br>eine geplante Betriebserweiterung</p>',
            h1998: '<p>Fertigstellung der 3-schiffigen Halle 4 für eine neue<br> Versandabteilung und für die Lagerung von Rohmaterial<br> und Fertigware.</p>',
            h2003: '<p>Eintritt von Dietmar Schöttler und Heike Schäfer als<br> Kommanditisten und Gesellschafter in die Firma und<br> Ernennung zu Geschäftsführern</p>'
    });
        var historiehashen = new Hash({
            h1960: '<p>Otto Bauckhage Metallwarenfabrik founded by Otto Bauckhage. Company\'s<br> headquarters in Friedlin near Herscheid, Schmiedeweg 12.</p>',
            h1961: '<p>Hans Werner Bauckhage joints the company as employee.</p>',
            h1965: '<p>Purchase of property in Herscheid, Müggenbrucher Weg and start of constructing the first factory building. Hans Werner Bauckhage takes over the company.</p>',
            h1966: '<p>Move from Friedlin to the new facility in Herscheid, Müggenbrucher Weg.</p>',
            h1970: '<p>Construction of second building, serving as tool construction and storage facility of raw material.</p>',
            h1978: '<p>Company becomes incorporated and changes name to "GmbH + Co.KG"</p>',
            h1979: '<p>Construction of building No. 3, serving as shipping and storage facility.</p>',
            h1984: '<p>Purchase of adjacent real estate to the north and west of the company\'s property for future expansion of the business.</p>',
            h1998: '<p>Completion of building No. 4, consisting of 3 bays and serving as new shipping department and as storage facility for raw material and finished goods.</p>',
            h2003: '<p>Mr. Dietmar Schöttler and Ms. Heike Schäfer join the company as limited partners and are appointed to Managing Directors.</p>'
    });
        var SlideList = new Class({
            initialize: function(menu, options) {
                this.setOptions(this.getOptions(), options);
                this.menu = $(menu), this.current = this.menu.getElement('li.current');
                this.menu.getElements('li').each(function(item){
                    item.addEvent('mouseover', function(){ this.moveBg(item); 
                }.bind(this));
                item.addEvent('mouseout', function(){
                    this.moveBg(this.current); 
                }.bind(this));
                item.addEvent('click', function(event){ this.clickItem(event, item); }.bind(this));
        }.bind(this));
        this.back = new Element('li').addClass('background').adopt(new Element('div').addClass('left')).injectInside(this.menu);
        this.back.fx = this.back.effects(this.options);
        if(this.current) this.setCurrent(this.current);
    },
    
    setCurrent: function(el, effect){
        this.back.setStyles({left: (el.offsetLeft)+'px', width: (el.offsetWidth)+'px'});
        (effect) ? this.back.effect('opacity').set(0).start(1) : this.back.setOpacity(1);
        this.current = el;
    },
    
    getOptions: function(){
        return {
            transition: Fx.Transitions.sineInOut,
            duration: 500, wait: false,
            onClick: Class.empty
        };
    },

    clickItem: function(event, item) {
        if(!this.current) this.setCurrent(item, true);
        this.current = item;
        this.options.onClick(new Event(event), item);
    },

    moveBg: function(to) {
        if(!this.current) return;
        this.back.fx.custom({
            left: [this.back.offsetLeft, to.offsetLeft],
            width: [this.back.offsetWidth, to.offsetWidth]
        });
    }
});

SlideList.implement(new Options);
        if ($('historie')) {
        new SlideList($E('ul', 'historie'), {transition: Fx.Transitions.backOut, duration: 900, onClick: function(ev, item) { ev.stop();$('updateBox').setHTML(historiehash.get(item.id));$('historie_image').setProperty('src', '../../images/historie/'+ item.id +'.jpg'); }});
        }
        if ($('history')) {
        new SlideList($E('ul', 'historie'), {transition: Fx.Transitions.backOut, duration: 900, onClick: function(ev, item) { ev.stop();$('updateBox').setHTML(historiehashen.get(item.id));$('historie_image').setProperty('src', '../../images/historie/'+ item.id +'.jpg'); }});
        }
    }
};
window.addEvent('load', Site.start);