/**
 * Enables/Disables text selection, saves selected text
 *   
 * @example jQuery('p').enableTextSelect(); / jQuery('#selectable-area').disableTextSelect();
 * @cat plugin
 * @type jQuery 
 *
 */
(function() {
	var mouseDownFn = function() {
		return false;
	}
	jQuery.fn.disableTextSelect = function() {
	  return this.each(function() {
		$(this).css({
		  'MozUserSelect' : 'none'
		}).bind('selectstart', function() {
		  return false;
		}).bind('mousedown', mouseDownFn);
	  });
	};
	
	jQuery.fn.enableTextSelect = function() {
	  return this.each(function() {
		$(this).css({
		  'MozUserSelect':''
		}).unbind('selectstart').unbind('mousedown', mouseDownFn);
	  });
	};
})();
