/*
	Auto Lightbox 0.1
	
	Author:
		Ralf Hortt, 'Horttcore' - http://www.horttcore.de

	License:
		MIT-style license
		
	Class: 
		Lightbox
		
	Description:
		Open linked Images in a Lightbox
		
	Requirements:
		auto_lightbox.js BEFORE the lightbox script in the head
		installed Slimbox
		Mootools 1.2 - Earlier Version should also work as its very simple 
	
	Usage:
		Link this scriptfile in your header
				
	Example:
		<script type="text/css" scr="auto_lightbox.js"></script>
*/
window.addEvent('domready', function(){
	
	var show = 'lightbox[]' // change to the specific class
	
 	$$("a img").each(function(lighter,i){
		link = lighter.getParent();
		href = link.getProperty('href');
		if (href.search(/.png|.jpg|.jpeg|.bmp|.gif/) != '-1') {
			//link.addClass(show);
			link.setProperty('rel',show);
		}
	});
});