window.addEvent('domready', function(){
/*
 * The easy way:
 * > ReMooz.initialize(); // searches for "a.remooz" and adds remooz class
 * Change query this way
 * > ReMooz.options.query = 'a[rel^=remooz], img[rel^=remooz]';
 * Now images and links with rel attrbute beginning with remooz are fetched
 * You can also define options, json encoded in the rel attribute
 * <a href="more.jpg" class="remooz" rel="{resize:false}"></a>
 * This example creates classes manual
*/

$$('#container div:children(0) img').each(function(img, i) {
	new ReMooz(img, {
		url: img.getParent().href
	});
});
ReMooz.initialize();

$$('#container div:children(1) img').each(function(img, i) {
	new ReMooz(img, {
		url: img.getParent().href,
		resizeOpacity: 0.05,
		hideSource: false
	});
});

$$('#container div:children(2) img').each(function(img, i) {
	new ReMooz(img, {
		url: img.getParent().href,
		positionToCenter: true,
		resizeFactor: 0.95,
		resizeOptions: {
			duration: 1
		}
	});
});

$$('#container div:children(3) img').each(function(img, i) {
	new ReMooz(img, {
		url: img.getParent().href,
		resizeLimit: {x: 480, y: 480},
		resizeOpacity: 0.4,
		positionToCenter: true,
		hideSource: false,
		resizeOptions: {
			transition: Fx.Transitions.Back.easeOut
		}
	});
});

});
