window.addEvent('domready', function() {
	diashow = null;	
	articles = $('previews').getChildren("div");
	articles[0].hide();
});
function showArticle(url) {
	if(diashow) {
	diashow.clear();	
	}
	$("article").empty();
	$("article").load(url);
	$("article").setStyle('opacity', '0');
	$("article").fade("in");
}
function showandhide(element) {
	$$('.preview').each(display);
	element.parentNode.fade("out");
	element.parentNode.hide();
}

function display(preview) {
	preview.setStyle('display', 'block');
	preview.fade("in");
}
function showGallery(urls) {
	var diashow = new SlideAnimation(
		"animation",
		urls,
		{
			delay: 4,
			padding: 0,
			width: 613,
			height:400
		});
	var link = new Element('a', {
		'href': '#',
		'styles': {
			'position': 'absolute',
			'display': 'block',
			'width': '613px',
			'height': '400px',
			'background-color': '#000000',
			'opacity': '0.001',
			'filter': 'alpha(opacity=0)'
		}
	}).inject(this.animation);
}

