/**
 * @author Nathan Kelly - http://www.nathan-kelly.com/
 *  my email address is my first name @nathan-kelly.com
 * @copyright 2009 Nathan Kelly
 * @package nk-externallinks
 * @version 1.0.0
 * @url http://projects.nathan-kelly.com/
 * @dependencies 
 * 	prototype.js 1.6.0.2+ (http://www.prototypejs.org/)
 *	scriptaculous.js 1.8.1+ (http://script.aculo.us/)
 * @license
 *	Creative Commons Attribution 2.5 Australia License
 *	http://creativecommons.org/licenses/by/2.5/au/
 */

var nk_externallinks = Class.create({	
	initialize: function() {		
		$$('a[rel^=external]').each( function (a) {
			a.observe( 'click', ( function(e) {				
				window.open( a.href, 'external' );
				Event.stop(e);
			}).bindAsEventListener(this) );			
		});		
	}	
});

document.observe('dom:loaded', function () { new nk_externallinks(); });

