var myrules = {
		'span.small a' : function(element) {
			element.onclick = function() {
				resizeText('small', '#article_body');
				return false; // so link does not go to destination
			}
		},
		'span.med a' : function(element) {
			element.onclick = function() {
				resizeText('med', '#article_body');
				return false; // so link does not go to destination
			}
		},
		'span.large a' : function(element) {
			element.onclick = function() {
				resizeText('large', '#article_body');
				return false; // so link does not go to destination
			}
		}
	};
	
Behaviour.register(myrules);

Behaviour.addLoadEvent(
	function() {
		displayTextSizer('div#optionsDiv');
		if (readCookie("textSize")) {
			resizeText(readCookie("textSize"), '#article_body');
		} else {
			resizeText('med', '#article_body');
		}
		Behaviour.apply(); // re-apply the rules since the DOM has been modified
	}
);
