if(typeof $ !== 'undefined' && typeof $$ === 'undefined') {
$(function() {
	$.extend({
		fontSizeControls: {
			orgSize: $('html').css('font-size'),
			controls: {
				increase: {
					title: 	'Større tekst',
					label: 	'aA +'
				},
				decrease: {
					title: 	'Mindre tekst',
					label: 	'Aa -'
				},
				reset: {
					title: 	'Nulstil tekststørrelse',
					label: 	'Nulstil'
				}
			},
			toggle: function(type) {
				if(type == 'reset') {
					$('html').css('font-size', this.orgSize);
				} else {
					scale = ((type == 'increase') ? 1.1 : 0.9);

					var current = parseFloat($('html').css('font-size'), 10);
					$('html').css('font-size', current*scale);
				}
			},
			insertIn: function(elm) {
				$(elm).append(
					$(document.createElement('span'))
						.addClass('fontSizeControls')
						.append(
							$(document.createElement('em'))
							.text('Tekststørrelse: ')
							.css('visibility', 'hidden')
						)
						.mouseover(function(){
							$('em', this).css('visibility', 'visible');
						})
						.mouseout(function(){
							$('em', this).css('visibility', 'hidden');
						})
				)
				$.each(this.controls, function(control) {
					var c = $.fontSizeControls.controls[control];
					
					$('.fontSizeControls', elm).append(
						$(document.createElement('a'))
							.attr({
								title: c.title,
								href: '#'
							})
							.addClass(control)
							.text(c.label)
							.click(function(event) {
								$.fontSizeControls.toggle(control);
								event.preventDefault();
							})
					)
				});
			}
		}
	});
});
}
else throw 'Either jQuery is not loaded or there\'s a conflict with $ function';