var lastURL = "";

function moreInfoShow(el) {
	var sURL = el.href
	
	// close if same link clicked again
	if (sURL == lastURL) {
		moreInfoClose()
		lastURL = "";
	}
	else {
		new Ajax.Updater('more-info', sURL, { onComplete: function() { pageTracker._trackPageview(sURL); } })

		var sDiv = $('more-info-container')
		
		var leftCnr = (document.viewport.getWidth()/2) - (sDiv.getWidth()/2)
		sDiv.style.left = leftCnr + 'px'
		//sDiv.style.top = el.cumulativeOffset().top - 300 + 'px'
		sDiv.style.top = document.viewport.getScrollOffsets().top + 130 + 'px'

		$('more-info-container').appear({ duration:0.3 })

		lastURL = sURL
	}

}


function moreInfoClose() {
	var sDiv = $('more-info-container')
	
	sDiv.dropOut({ duration:0.3 })
	
	lastURL = "";
}

