var Mbx_galerie = new Class({
	initialize : function()
	{
		this.initMultibox();
	},
	
	initMultibox : function()
	{
		//vorbereitung
		$('gallery').getElements('.popup').each(function(el) {
			el.set(
				'href', 
				el.getElement('img').get('src').replace(/height=100/g, 'width=520').replace(/&width=150&resizemode=fill/, '')
			);
		});
		
		//zusaetzliche verlinkung fuer lupen-elemente
		$('gallery').getElements('div.imagelink').each(function(el) {
			var lens = el.getElement('div');
			lens.setStyle('cursor', 'pointer');
			lens.addEvent('click', function(cEv) {
				cEv.target = el.getElement('a');
				el.getElement('a').fireEvent('click', cEv);
			}.bind(el));
		});
		
		//multibox initialisieren
		var initMultiBox = new multiBox({
			initialSize: {w:550, h:250},
			mbClass: '.popup',//class you need to add links that you want to trigger multiBox with (remember and update CSS files)
			container: $(document.body),//where to inject multiBox
			descClassName: 'multiBoxDesc',//the class name of the description divs
			path: './Files/',//path to mp3 and flv players
			useOverlay: true,//use a semi-transparent background. default: false;
			maxSize: {w:520, h:1024},//max dimensions (width,height) - set to null to disable resizing
			addDownload: false,//do you want the files to be downloadable?
			pathToDownloadScript: './Scripts/ForceDownload.asp',//if above is true, specify path to download script (classicASP and ASP.NET versions included)
			addRollover: false,//add rollover fade to each multibox link
			addOverlayIcon: false,//adds overlay icons to images within multibox links
			addChain: false,//cycle through all images fading them out then in
			recalcTop: true,//subtract the height of controls panel from top position
			addTips: true,//adds MooTools built in 'Tips' class to each element (see: http://mootools.net/docs/Plugins/Tips),
			fixedTop: 50
		});
	}
});
