$.fn.extend({ 
	disableSelection: function() { 
		this.each(function() { 
			if (typeof this.onselectstart != 'undefined') {
				this.onselectstart = function() { return false; };
			} else if (typeof this.style.MozUserSelect != 'undefined') {
				this.style.MozUserSelect = 'none';
			} else {
				this.onmousedown = function() { return false; };
			}
		}); 
	} 
});
$(document).ready(function() {
	$('#tabs').tabs({cache:false});
	$('a.external').attr('target','_blank');
	$('a.region-edit-link').mouseenter(function() {
		$(this).parents('div.highlight-edit-cont').css({'background-color':'rgb(221,221,221)','background-color':'rgba(191,191,191,0.65)'});
	}).mouseleave(function() {
		$(this).parents('div.highlight-edit-cont').css('background-color','transparent');
	});
//This hotfix makes older versions of jQuery UI drag-and-drop work in IE9. Fixed in jQuery UI 1.8.6
	var a=$.ui.mouse.prototype._mouseMove;
	$.ui.mouse.prototype._mouseMove=function(b){
	if($.browser.msie&&document.documentMode>=9){b.button=1};
	a.apply(this,[b]);}
});
