window.addEvent('domready', function() {
	if (!$('recommend_link')) return;
	$("recommend_link").addEvent('click', function(event){
		var div = Element('div',{
			'id' : 'recommend'
		});
		div.inject(document.body);
		new Overlay(document.body,{
			id: 'overlay',
			color: '#000',
			duration: 300,
			opacity: 0.7,
			onShow: function() {
				div.setStyle("left", parseInt((window.getWidth() - div.getWidth()) / 2));
				var myHTMLRequest = new Request.HTML({
					url:'/',
					update: "recommend"
				}).get({'module': 'recommend', 'action' : 'form'});
				new Fx.Tween($('recommend'), {'duration': 500}).start('opacity', 0, 1);
			}
		}).open();
		event.preventDefault();
	});
});


