/**
 * jQuery Clean Outbound Link Tracking plugin (For Google Analytics)
 * 
 * @author Marco "DWJ" Solazzi - hello@dwightjack.com
 * @license  Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 * @copyright Copyright (c) 2008 Marco Solazzi
 * @version 0.1
 * @requires jQuery 1.2.x
 */
(function (jQuery) {
	jQuery.fn.colt = function(attr) {
		return this.each(function () {
			var rev = jQuery(this).attr(attr || "rev");
			if (rev != "" && ( typeof UrchinTracker != "undefined" || typeof _gat != "undefined" ) ) {
				if (rev.charAt(0) != "/") {
					rev = "/"+rev;
				}
				var fn = typeof _gat != "undefined" ? pageTracker._trackPageview : UrchinTracker;
				jQuery(this).click(function () {
					fn.call(null,jQuery.trim(rev).replace(/\s/,"/"));
					return false;
				});
			}
		});
	};
})(jQuery);