(function($){
	$.fn.fadeToggle = function(speed, easing, callback) {
		return this.animate({
			opacity: 'toggle'
		}, speed, easing, callback);
	};

	$.getCSS = function( url, media ){
		$(document.createElement('link') ).attr({
			href: url,
			media: media || 'screen',
			type: 'text/css',
			rel: 'stylesheet'
		}).appendTo('head');
	};

	$.getJS = function( url ){
		$(document.createElement('script') ).attr({
			src: url,
			type: 'text/javascript'
		}).appendTo('head');
	}

})(jQuery);


(function($){
	if ($.browser.mozilla) {
		$.fn.textSelect = function($bool) {
			if ($bool) {
				return this.each(function() {
					$(this).css({
						'MozUserSelect' : ''
					});
				});
			}
			else {
				return this.each(function() {
					$(this).css({
						'MozUserSelect' : 'none'
					});
				});
			}
		}
	} else if ($.browser.msie) {
		$.fn.textSelect = function($bool) {
			if ($bool) {
				return this.each(function() {
					$(this).unbind('selectstart.disableTextSelect');
				});
			}
			else {
				return this.each(function() {
					$(this).bind('selectstart.disableTextSelect', function() {
						return false;
					});
				});
			}
		}
	} else {
		$.fn.textSelect = function($bool) {
			if ($bool) {
				return this.each(function() {
					$(this).unbind('mousedown.disableTextSelect');
				});
			}
			else {
				return this.each(function() {
					$(this).bind('mousedown.disableTextSelect', function() {
						return false;
					});
				});
			}
		}
	}
})(jQuery);


