function show( ul ) {
	
	if( $(ul).style.display == 'none' ) {
		$(ul).style.display = 'block';
	} else {
		$(ul).style.display = 'none';
	}
}

function clearForm() {
	$('qForm').name.value = '';
	$('qForm').email.value = '';
	$('qForm').phone.value = '';
	$('qForm').desc.value = '';
	$('qForm').captcha.value = '';
}

window.addEvent('load', function() {
	var a = $$('a');
	a.each(function(item,i) {
		if( item.href.match(/\.jpg/igm) && $$('div.news_content').length ) {
			var id = item.getParent('div.news_content').getProperty('id');
			item.setProperty('rel', 'milkbox[gal'+id+']');
		}
	});
	
	/*
	$$('div.news_content a img').each(function(img,i){
		var item = img.getParent('a');
		console.log(item.href.substr(-4));
		
		if ((item.href.substr(-4) == '.jpg' || item.href.substr(-4) == '.JPG')) {
			var id = item.getParent('div.news_content').getProperty('id');
			item.setProperty('rel', 'milkbox[gal'+id+']');
			console.log(item);
		}
	});
	*/
	
	milkbox = new Milkbox();
	milkbox.reloadGalleries();
})

