/**
 * @author	mel
 * Date created: 	09-08-2007 21:00 
 * Date revised: 	12-02-2008 16:15
*/
var App = {
	
	Cache:{
		// content is loaded here from various functions
		Data:{},
		get:function (k){ return this.Data[k]; },
		set:function (k,v){ this.Data[k] = v; }
	},
	
	Page: {
		
		PicChanger:{
	            init:function(){
	                if($("pic-s")){
	                    var imgsSmall = $$("#pic-s img");
	                    var imgsLarge = $$("#pic-l img");
	                    if(imgsSmall.length==imgsLarge.length){
				for(var i=0; i<imgsSmall.length; i++){
					imgsLarge[i].style.display = "none";
					imgsSmall[i].setAttribute("_index",i);
					imgsSmall[i].addEvent("click",function (e){
						var imgL = $$("#pic-l img");
						for(var i=0; i<imgL.length; i++){
							imgL[i].style.display = (this.getAttribute("_index")==i)?"block":"none";
						}
						new Event(e).stop();
					});
				}
	                    }
	                    imgsLarge[0].style.display = "block";
	                }
	            }
	        },

		ExpandText:{
			config:{
				"5":71, // == 5 lines == 71px
				"15":227 // == 15 lines == 227px
			},
			init:function (){
				var targetsTexts = $$("#grid .js-readmore");
				var targetsBtns = $$("#grid .js-btn-readmore");
				if(targetsTexts.length==targetsBtns.length){
					for(var i=0; i<targetsTexts.length; i++){
						var lines = parseInt(targetsTexts[i].className.split(" ")[1]); // will parse className "js-readmore 15-lines" or "js-readmore 5-lines"
						if(targetsTexts[i].offsetHeight>this.config[lines]){
							var sId = "toogletarget"+i;
							targetsTexts[i].id = sId;
							targetsBtns[i].style.display = "block";
							targetsBtns[i].setAttribute("_target",sId);
							targetsBtns[i].setAttribute("_realHeight",targetsTexts[i].offsetHeight);
							targetsBtns[i].setAttribute("_croppedHeight",this.config[lines]);
							$(targetsBtns[i]).addEvent("click",function (e){
								var fx = new Fx.Style($(this.getAttribute("_target")),"height",{onComplete:function (){ new Fx.Style(this,"opacity",{duration:500}).start(1,0); }.bind(this) }).start(this.getAttribute("_croppedHeight"),this.getAttribute("_realHeight"));
								new Event(e).stop();
							});
							// do this last or the actual height will be the same as the offsetheight  
							targetsTexts[i].style.height = this.config[lines]+"px";
						}
					}
				}
			}
		},
		Print:{
			init:function(){
				var o = $("js-print-reciept");
				if(o){
					o.style.display = "block";
					o.onclick = function (){
						window.print();
						return false;
					};
				}
			}
		},
		Sifr:{
			init:function(){
			    var path = App.Cache.get("imageDirUrl")+"/Images/clarendon.swf";
				if(typeof sIFR == "function"){
					sIFR.replaceElement(named({sSelector:"#mt li.item",sFlashSrc:path,sFlashVars:"textalign=center",sCase:"upper",sColor:"#ffffff",sHoverColor:App.Cache.get("maincolor"),sWmode:"transparent",nPaddingTop:13,nPaddingBottom:9}));
					sIFR.replaceElement(named({sSelector:"#mt li.item-s",sFlashSrc:path,sFlashVars:"textalign=center",sCase:"upper",sColor:App.Cache.get("maincolor"),sHoverColor:App.Cache.get("maincolor"),sWmode:"transparent",nPaddingTop:13,nPaddingBottom:9}));
					sIFR.replaceElement(named({sSelector:"#bc h1",sFlashSrc:path,sCase:"upper",sColor:App.Cache.get("maincolor"),sHoverColor:App.Cache.get("maincolor"),sWmode:"transparent",nPaddingTop:0,nPaddingBottom:0}));
				}
			}
		},
		
		SearchArea:{
			initSearchField:function (){
				var o = $$("#mt input");
				if(o.length>0){
					for(var i=0; i<o.length; i++){
						if(o[i].type == "text" && o[i].className == "text qry"){
							var inp = $(o[i]);
							inp.setAttribute("_inittext",inp.value);
							inp.addEvent("focus",function (){
								if(this.value == this.getAttribute("_inittext")){
									this.value = "";
								}
							});
							inp.addEvent("blur",function (){
								if(this.value == ""){
									this.value = this.getAttribute("_inittext");
								}
							});
						}
					}
				}
			},
			clearTextOnFocus:function (o){
				var o = $$(".jsClearOnFocus");
				if(o.length>0){
					for(var i=0; i<o.length; i++){
						var inp = $(o[i]);
						inp.setAttribute("_inittext",inp.value);
						inp.addEvent("focus",function (){
							if(this.value == this.getAttribute("_inittext")){
								this.value = "";
							}
						});
						inp.addEvent("blur",function (){
							if(this.value == ""){
								this.value = this.getAttribute("_inittext");
							}
						});
					}
				}
			}
		},
		BottomLogos:{
			init:function (){
				var logos = ["po","bh","jp","ov","eb"];
				for(var i=0; i<logos.length; i++){
					if($(logos[i]+"Logo")){
						$(logos[i]+"Logo")._prefix = logos[i];
						$(logos[i]+"Logo").setAttribute("_origImgSrc",$(logos[i]+"Logo").getElementsByTagName("IMG")[0].src);
						$(logos[i]+"Logo").addEvent("mouseover",function (){
							this.getElementsByTagName("IMG")[0].src = App.Cache.get("imageDirUrl")+"/Images/"+App.Cache.get("path")+"/logos/"+this._prefix+"_over.gif";
						});
						$(logos[i]+"Logo").addEvent("mouseout",function (){
							this.getElementsByTagName("IMG")[0].src = this.getAttribute("_origImgSrc");
						});
					}
				}
			}
		},
		
		start:function (){
			if(typeof App.Cache.get("path")=="string"){
				
				// product details func
				App.Page.ExpandText.init();
				App.Page.PicChanger.init();
				
				App.Page.Print.init();
				App.Page.Sifr.init();
				App.Page.SearchArea.initSearchField();
				App.Page.SearchArea.clearTextOnFocus();
				App.Page.BottomLogos.init();
				
				if($("car1")){
					var car1 = new Carousel('car1',1);
				}
				if($("car2")){
					var car2 = new Carousel('car2',2);
				}
				if($("car3")){
					var car3 = new Carousel('car3',3);
				}
				
				// hover texts on products in a carousel
				var tips = new Tips($$('.tips'));
				
				// add the element to the cache so other objects/functions can access the hide method
				App.Cache.set("toolTipHook",tips);
				
				// initialize tabs if any
				if($("tabs-product")){
					var tabs = new Tabs("tabs-product",1);
				}
                
		                // make the whole shopping basket clickable
		                $("sb").addEvent("click",function (){
		                    window.location.href = App.Cache.get("basketUrl");
		                });

			}

		} // @App.Page.start
				
	} // @App.Page
} // @App

/**
 * Initialize the document
*/
window.addEvent('domready', App.Page.start);

/**
 * Moo extensions
*/

/**
* JME 20080530 RFC3030: Ny funktion kreret af MEL. Gammel funktion udkommenteret.

var Carousel = new Class({
	containerIdName: null,
	container: null,
	elements: new Array(),
	actualLeft: 0,
	containerWidth: 0,
	containerHeight: 0,
	leftScroller: null,
	rightScroller: null,
	speed: 300,
	nextLeft:0,
	currentLeft:0,
	currentIndex:0,
	animating:false,
	scrollLeftDisabled:true,
	scrollRightDisabled:true,
	carCounter:0,
	hasScrollers:false,
	
	initialize:function(id,index){
		this.containerIdName = id;
		this.container = $(id);
		this.carCounter = index;
		var _elm = $ES('div.e',this.containerIdName);
		_elm.each( this.prv_addItem,this);
		this.prv_setScene();
	},
	
	prv_addItem:function(obj,num){
		var x = this.nextLeft;
		obj.setStyles({position:"absolute",left:x+"px"});
		var oW = obj.getStyle('width').toInt()+obj.getStyle('margin-right').toInt();
		this.elements.push([obj,x,oW]);
		this.nextLeft += oW;
	},
	
	prv_setScene:function(){
		this.containerWidth = this.container.offsetWidth;
		if(this.nextLeft >= this.containerWidth){
			this.leftScroller = new Element('div');
			this.leftScroller.addClass('btn-scroll-left');
			this.leftScroller.injectInside(this.container);
			this.leftScroller.id = 'btn-scroll-left'+this.carCounter;
			this.leftScroller.onclick = this.prv_scrollRight.bindAsEventListener(this);
			
			this.rightScroller = new Element('div');
			this.rightScroller.addClass('btn-scroll-right');
			this.rightScroller.injectInside(this.container);
			this.rightScroller.id = 'btn-scroll-right' + this.carCounter;
			this.rightScroller.onclick = this.prv_scrollLeft.bindAsEventListener(this);
			this.hasScrollers = true;
		}
		this.checkEndOfSlider();
	},
	
	prv_scrollLeft: function () { // clicking *right* button
		if(!this.scrollRightDisabled){
			if(!this.animating){
				App.Cache.get("toolTipHook").hide();
				var anim = new Fx.Style('car-slider'+this.carCounter, 'left', {duration:this.speed,onComplete:this.onScrollComplete.bindAsEventListener(this)});
				anim.start(this.currentLeft,this.currentLeft+(this.elements[this.currentIndex][2]*-1));
				this.animating = true;
				this.currentLeft -= this.elements[this.currentIndex][2];
				this.currentIndex++;
			}
		}
	},
	prv_scrollRight: function () { // clicking *left* button
		if(!this.scrollLeftDisabled){
			if(!this.animating){
				App.Cache.get("toolTipHook").hide();
				var anim = new Fx.Style('car-slider'+this.carCounter, 'left', {duration:this.speed,onComplete:this.onScrollComplete.bindAsEventListener(this)});
				anim.start(this.currentLeft,(this.currentLeft+this.elements[this.currentIndex-1][2]));
				this.animating = true;
				this.currentLeft += this.elements[this.currentIndex-1][2];
				this.currentIndex--;
			}
		}
	},
	checkEndOfSlider:function (){
	    if(this.hasScrollers){
		    if($("car-slider"+this.carCounter).getStyle("left").toInt()<0){
			    this.scrollLeftDisabled = false;
    		    $("btn-scroll-left"+this.carCounter).removeClass("btn-scroll-left-disabled");
    		    $("btn-scroll-left"+this.carCounter).setStyle("background-image","url("+App.Cache.get("imageDirUrl")+"/Images/"+App.Cache.get("path")+"/btn_prev.gif)");
		    } else {
			    this.scrollLeftDisabled = true;
			    $("btn-scroll-left"+this.carCounter).addClass("btn-scroll-left-disabled");
    		    $("btn-scroll-left"+this.carCounter).setStyle("background-image","url("+App.Cache.get("imageDirUrl")+"/Images/"+App.Cache.get("path")+"/btn_prev_dis.gif)");
		    }
		    if($("car-slider"+this.carCounter).getStyle("left").toInt()>=(0-(this.nextLeft-$("car-mask"+this.carCounter).getStyle("width").toInt()))){
			    this.scrollRightDisabled = false;
			    $("btn-scroll-right"+this.carCounter).removeClass("btn-scroll-right-disabled");
    		    $("btn-scroll-right"+this.carCounter).setStyle("background-image","url("+App.Cache.get("imageDirUrl")+"/Images/"+App.Cache.get("path")+"/btn_next.gif)");
		    } else {
			    this.scrollRightDisabled = true;
		        $("btn-scroll-right"+this.carCounter).addClass("btn-scroll-right-disabled");
    		    $("btn-scroll-right"+this.carCounter).setStyle("background-image","url("+App.Cache.get("imageDirUrl")+"/Images/"+App.Cache.get("path")+"/btn_next_dis.gif)");
		    }
	    }
	},
	onScrollComplete:function (){
		this.animating = false;
		this.checkEndOfSlider();
	}
});
*/

/**
* JME 20080530 RFC3030: Ny funktion kreret af MEL. Gammel funktion udkommenteret ovenover.
**/
var Carousel = new Class({
	containerIdName: null,
	container: null,
	elements: new Array(),
	actualLeft: 0,
	containerWidth: 0,
	containerHeight: 0,
	nextLeft:0,
	currentLeft:0,
	currentIndex:0,
	scrollLeftDisabled:true,
	scrollRightDisabled:true,
	carCounter:0,
	mouseIsDown:false,
	increments:4, // pixels pr. interval
	interval:10, // milliseconds
	
	initialize:function(id,index){
		this.containerIdName = id;
		this.container = $(id);
		this.carCounter = index;
		var _elm = $ES('div.e',this.containerIdName);
		_elm.each( this.prv_addItem,this);
		this.prv_setScene();
	},
	
	prv_addItem:function(obj,num){
		var x = this.nextLeft;
		obj.setStyles({position:"absolute",left:x+"px"});
		var oW = obj.getStyle('width').toInt()+obj.getStyle('margin-right').toInt();
		this.elements.push([obj,x,oW]);
		this.nextLeft += oW;
	},
	
	prv_setScene:function(){
		this.containerWidth = this.container.offsetWidth;
		
		// init the left button
		this.leftScroller = new Element('div',{id:"btn-scroll-left-"+this.carCounter});
		this.leftScroller.addClass('btn-scroll-left');
		this.leftScroller.injectInside(this.container);
		this.leftScroller.onmousedown = this.onMouseDownLeft.bindAsEventListener(this);
		this.leftScroller.onmouseup = this.onMouseUp.bindAsEventListener(this);
		
		// init the right button
		this.rightScroller = new Element('div',{id:"btn-scroll-right-"+this.carCounter});
		this.rightScroller.addClass('btn-scroll-right');
		this.rightScroller.injectInside(this.container);
		this.rightScroller.onmousedown = this.onMouseDownRight.bindAsEventListener(this);
		this.rightScroller.onmouseup = this.onMouseUp.bindAsEventListener(this);

		this.checkLeftEdge();
		this.checkRightEdge();
	},
	onMouseDownRight:function (){
		this.mouseIsDown = true;
		mouseStatus = this.onHoldRight.periodical(this.interval,this);
	},
	onMouseDownLeft:function (){
		this.mouseIsDown = true;
		mouseStatus = this.onHoldLeft.periodical(this.interval,this);
	},
	onMouseUp:function (){
		this.mouseIsDown = false;
		$clear(mouseStatus);
	},
	onHoldRight: function () { // clicking *right* button
		if(this.checkRightEdge()){
			App.Cache.get("toolTipHook").hide();
			var left = $('car-slider'+this.carCounter).getStyle("left").toInt();
			$('car-slider'+this.carCounter).setStyles({left:(left-this.increments)+"px"});
			this.checkLeftEdge();
		}
	},
	onHoldLeft: function () { // clicking *left* button
		if(this.checkLeftEdge()){
			App.Cache.get("toolTipHook").hide();
			var left = $('car-slider'+this.carCounter).getStyle("left").toInt();
			$('car-slider'+this.carCounter).setStyles({left:(left+this.increments)+"px"});
			this.checkRightEdge();
		}
	},
	checkLeftEdge:function (){
		if($("car-slider"+this.carCounter).getStyle("left").toInt()<0){
			this.scrollLeftDisabled = true;
			this.disableScroller("left");
			return true;
		} else {
			this.scrollLeftDisabled = false;
			this.enableScroller("left");
			return false;
		}
	},
	checkRightEdge:function(){
		if($("car-slider"+this.carCounter).getStyle("left").toInt()>=(14-(this.nextLeft-$("car-mask"+this.carCounter).getStyle("width").toInt()))){
			this.scrollRightDisabled = true;
			this.disableScroller("right");
			return true;
		} else {
			this.scrollRightDisabled = false;
			this.enableScroller("right");
			return false;
		}
	},
	enableScroller:function(sDir){
		$("btn-scroll-"+sDir+"-"+this.carCounter).addClass("btn-scroll-"+sDir+"-disabled");
	},
	disableScroller:function(sDir){
		$("btn-scroll-"+sDir+"-"+this.carCounter).removeClass("btn-scroll-"+sDir+"-disabled");
	}
});

var Tabs = Class({
	container:"",
	openTab:1,
	initialize:function(id,openTab){
		this.container = id;
		this.openTab = openTab;
		var links = $$("#"+this.container+" ul.tabs-nav a");
		var tabs = $$("#"+this.container+" div.tab");
		links.each(function(el,i){
			//console.log(el + ", " + i)
			el.setProperty("tab",tabs[i].id);
			tabs[i].setStyle("display","none");
			el.addEvent("click",function (){
				var showTab = this.getProperty("tab");
				tabs.each(function (elm){
					if(elm.id == showTab){
						elm.style.display = "block";
						//var fx = new Fx.Style(elm,"opacity",{duration:500}).start(0,1);
					} else {
						elm.style.display = "none";
					}
				});
				links.each(function (elm){
					elm.parentNode.className = "";
				});
				el.parentNode.className = "selected";
			}); // clickevent
		}.bind(this));
		tabs[this.openTab-1].style.display = "block";
		links[openTab-1].parentNode.className = "selected"; // mark the first tab as selected onload
		this.checkForLonelyTab(links[openTab-1],tabs.length);
	},
	checkForLonelyTab:function (firstTab,howManyTabs){
		if(howManyTabs==1){
			firstTab.parentNode.className += " disabled-tab";
		}
	}
});

/*
	Slimbox v1.41 - The ultimate lightweight Lightbox clone
	by Christophe Beyls (http://www.digitalia.be) - MIT-style license.
	Inspired by the original Lightbox v2 by Lokesh Dhakar.
*/

var Lightbox = {

	init: function(options){
		this.options = $extend({
			resizeDuration: 400,
			resizeTransition: false,	// default transition
			initialWidth: 250,
			initialHeight: 250,
			animateCaption: true,
			showCounter: true
		}, options || {});

		this.anchors = [];
		$each(document.links, function(el){
			if (el.rel && el.rel.test(/^lightbox/i)){
				el.onclick = this.click.pass(el, this);
				this.anchors.push(el);
			}
		}, this);
		this.eventKeyDown = this.keyboardListener.bindAsEventListener(this);
		this.eventPosition = this.position.bind(this);

		this.overlay = new Element('div', {'id': 'lbOverlay'}).injectInside(document.body);

		this.center = new Element('div', {'id': 'lbCenter', 'styles': {'width': this.options.initialWidth, 'height': this.options.initialHeight, 'marginLeft': -(this.options.initialWidth/2), 'display': 'none'}}).injectInside(document.body);
		this.image = new Element('div', {'id': 'lbImage'}).injectInside(this.center);
		this.prevLink = new Element('a', {'id': 'lbPrevLink', 'href': '#', 'styles': {'display': 'none'}}).injectInside(this.image);
		this.nextLink = this.prevLink.clone().setProperty('id', 'lbNextLink').injectInside(this.image);
		this.prevLink.onclick = this.previous.bind(this);
		this.nextLink.onclick = this.next.bind(this);

		this.bottomContainer = new Element('div', {'id': 'lbBottomContainer', 'styles': {'display': 'none'}}).injectInside(document.body);
		this.bottom = new Element('div', {'id': 'lbBottom'}).injectInside(this.bottomContainer);
		new Element('a', {'id': 'lbCloseLink', 'href': '#'}).injectInside(this.bottom).onclick = this.overlay.onclick = this.close.bind(this);
		this.caption = new Element('div', {'id': 'lbCaption'}).injectInside(this.bottom);
		this.number = new Element('div', {'id': 'lbNumber'}).injectInside(this.bottom);
		new Element('div', {'styles': {'clear': 'both'}}).injectInside(this.bottom);

		var nextEffect = this.nextEffect.bind(this);
		this.fx = {
			overlay: this.overlay.effect('opacity', {duration: 500}).hide(),
			resize: this.center.effects($extend({duration: this.options.resizeDuration, onComplete: nextEffect}, this.options.resizeTransition ? {transition: this.options.resizeTransition} : {})),
			image: this.image.effect('opacity', {duration: 500, onComplete: nextEffect}),
			bottom: this.bottom.effect('margin-top', {duration: 400, onComplete: nextEffect})
		};

		this.preloadPrev = new Image();
		this.preloadNext = new Image();
	},

	click: function(link){
		if (link.rel.length == 8) return this.show(link.href, link.title);

		var j, imageNum, images = [];
		this.anchors.each(function(el){
			if (el.rel == link.rel){
				for (j = 0; j < images.length; j++) if(images[j][0] == el.href) break;
				if (j == images.length){
					images.push([el.href, el.title]);
					if (el.href == link.href) imageNum = j;
				}
			}
		}, this);
		return this.open(images, imageNum);
	},

	show: function(url, title){
		return this.open([[url, title]], 0);
	},

	open: function(images, imageNum){
		this.images = images;
		this.position();
		this.setup(true);
		this.top = window.getScrollTop() + (window.getHeight() / 15);
		this.center.setStyles({top: this.top, display: ''});
		this.fx.overlay.start(0.8);
		return this.changeImage(imageNum);
	},

	position: function(){
		this.overlay.setStyles({'top': window.getScrollTop(), 'height': window.getHeight()});
	},

	setup: function(open){
		var elements = $A(document.getElementsByTagName('object'));
		elements.extend(document.getElementsByTagName(window.ie ? 'select' : 'embed'));
		elements.each(function(el){
			if (open) el.lbBackupStyle = el.style.visibility;
			el.style.visibility = open ? 'hidden' : el.lbBackupStyle;
		});
		var fn = open ? 'addEvent' : 'removeEvent';
		window[fn]('scroll', this.eventPosition)[fn]('resize', this.eventPosition);
		document[fn]('keydown', this.eventKeyDown);
		this.step = 0;
	},

	keyboardListener: function(event){
		switch (event.keyCode){
			case 27: case 88: case 67: this.close(); break;
			case 37: case 80: this.previous(); break;	
			case 39: case 78: this.next();
		}
	},

	previous: function(){
		return this.changeImage(this.activeImage-1);
	},

	next: function(){
		return this.changeImage(this.activeImage+1);
	},

	changeImage: function(imageNum){
		if (this.step || (imageNum < 0) || (imageNum >= this.images.length)) return false;
		this.step = 1;
		this.activeImage = imageNum;

		this.bottomContainer.style.display = this.prevLink.style.display = this.nextLink.style.display = 'none';
		this.fx.image.hide();
		this.center.className = 'lbLoading';

		this.preload = new Image();
		this.preload.onload = this.nextEffect.bind(this);
		this.preload.src = this.images[imageNum][0];
		return false;
	},

	nextEffect: function(){
		switch (this.step++){
		case 1:
			this.center.className = '';
			this.image.style.backgroundImage = 'url('+this.images[this.activeImage][0]+')';
			this.image.style.width = this.bottom.style.width = this.preload.width+'px';
			this.image.style.height = this.prevLink.style.height = this.nextLink.style.height = this.preload.height+'px';

			this.caption.setHTML(this.images[this.activeImage][1] || '');
			this.number.setHTML((!this.options.showCounter || (this.images.length == 1)) ? '' : 'Billede '+(this.activeImage+1)+' af '+this.images.length);

			if (this.activeImage) this.preloadPrev.src = this.images[this.activeImage-1][0];
			if (this.activeImage != (this.images.length - 1)) this.preloadNext.src = this.images[this.activeImage+1][0];
			if (this.center.clientHeight != this.image.offsetHeight){
				this.fx.resize.start({height: this.image.offsetHeight});
				break;
			}
			this.step++;
		case 2:
			if (this.center.clientWidth != this.image.offsetWidth){
				this.fx.resize.start({width: this.image.offsetWidth, marginLeft: -this.image.offsetWidth/2});
				break;
			}
			this.step++;
		case 3:
			this.bottomContainer.setStyles({top: this.top + this.center.clientHeight, height: 0, marginLeft: this.center.style.marginLeft, display: ''});
			this.fx.image.start(1);
			break;
		case 4:
			if (this.options.animateCaption){
				this.fx.bottom.set(-this.bottom.offsetHeight);
				this.bottomContainer.style.height = '';
				this.fx.bottom.start(0);
				break;
			}
			this.bottomContainer.style.height = '';
		case 5:
			if (this.activeImage) this.prevLink.style.display = '';
			if (this.activeImage != (this.images.length - 1)) this.nextLink.style.display = '';
			this.step = 0;
		}
	},

	close: function(){
		if (this.step < 0) return;
		this.step = -1;
		if (this.preload){
			this.preload.onload = Class.empty;
			this.preload = null;
		}
		for (var f in this.fx) this.fx[f].stop();
		this.center.style.display = this.bottomContainer.style.display = 'none';
		this.fx.overlay.chain(this.setup.pass(false, this)).start(0);
		return false;
	}
};

window.addEvent('domready', Lightbox.init.bind(Lightbox));
