jQuery(function($){
	
	//Behaviour for Autofill Form Elements
	/*
	$('.autofill')
		.live('focus',function(){ if (this.value == this.defaultValue) this.value = ''; })
		.live('blur', function(){ if (this.value == '') this.value = this.defaultValue; });
	*/
	
	
	//Cross-Domain Links (Old)
	/*
	$('a[href]').each(function(){
		var $a = $(this)
			, hn = location.hostname
			, re = new RegExp('^https?://' + hn.replace(/\./,'\\.') + '[^\\w\\d.-]','i');
		if (!this.href.match(re)) {
			$a.attr('target','_blank');
		}
	});
	*/
	
	//Cross-Domain Links (New - Works with Ajax-loaded content)
	var re = /^https?:\/\/([\w\d.-]+)/i, hn = location.hostname.toLowerCase();
	$('a[href]').live('click',function(){
		var m = this.href.match(re);
		if (m && m[1].toLowerCase() != hn) {
			$(this).attr('target','_blank');
		}
	});
	
});

