;(function($) {
	/**
	 * Make a <a> tag open in a new window (used for external links)
	 *
	 * @author	Sylvain Guillopé
	 * @date	2009-08-28
	 *
	 * @param	string		sUrl	Url of the <a> link
	 * @access	public
	 * @return	object
	 **/
	$.fn.externalLink = function(sUrl) {
		if (undefined == sUrl) {
			sUrl = '';
		}
		
		return this.click(function(e) {
			var sRelAttr = $(this).attr('rel');
			var sUrlAttr = $(this).attr('href');
			
			e.preventDefault();
			if ('' != sUrl) {
				window.open(sUrl);
			}
			else if ('' != sRelAttr) {
				window.open(sRelAttr);
			}
			else if ('' != sUrlAttr && '#' != sUrlAttr) {
				window.open(sUrlAttr);
			}
		});
	};
})(jQuery);