/** @package eFocus js lib */

/**
 * escrips.js - default scripts commonly used
 *
 * @author Rocco Janse <rocco@efocus.nl>
 * @since 1.0, 14 aug, 2009
 * @copyright eFocus
 * @package eFocus js lib
 * @uses MooTools 1.2.2 More <http://www.mootools.net>
 */

/**
 * Opens external links without the target attribute
 * 
 * @author Ralph Meeuws <ralph.meeuws@efocus.nl>
 * @author Rocco Janse <rocco@efocus.nl>
 * @since 1.0, 14 aug, 2009
 * @return void
 */
 
function fixExternalLinks() {
	var arrExternalLinks = $$('a.external');
	if (arrExternalLinks.length == 0) return;
	
	arrExternalLinks.each(function(link) {
		link.addEvents({
			'click': function(event) {
				event.stop();
				window.open(this.get('href'));
			}   
		});
	});
}