//Controles de acessibilidade
	
	maxLimit = 3;
	inc = 0;
	var tipo;
	increase = 1;
	var x;
	arr = [];

	function removeContrast(){
		$('head #contrastCss').remove();
		eraseCookie('contrast');
	}
	
	function aumentarFonte(){
		if (inc<maxLimit)	{				
			$("div, td, tr, p, b, table, strong, em, a, h1, h2, h3, pre, sub, sup, i, th, cp, ul, ol, li, dt, dd, input, span ").each(function(){
				if (!$(this).hasClass('noChange')) {							
					f =	$(this).css('font-size');
					f = parseInt(f.replace('px',''));
					f += increase;
					$(this).css('font-size',f+'px');
				}
			 })
			inc++;
			createCookie('textsizeConselho',inc,1);
		}
	}
	
	function diminuirFonte(){
		if (inc>-maxLimit)	{				
			$("div, td, tr, p, b, table, strong, em, a, h1, h2, h3, pre, sub, sup, i, th, cp, ul, ol, li, dt, dd, input, span ").each(function(){
				if (!$(this).hasClass('noChange')) {
					f =	$(this).css('font-size');
					f = parseInt(f.replace('px',''));
					f -= increase;
					$(this).css('font-size',f+'px');
				}
			 })
			inc--;
			createCookie('textsizeConselho',inc,1);
		}
	}
	
	
	function fonteNormal(){
		for (i=0;i<arr.length;i++) {
				$(arr[i][0]).css('font-size',arr[i][1]);
		}
		inc = 0;
		createCookie('textsizeConselho', 0,1);
	}
	
	$(document).ready(function() {	
		$("div, td, tr, p, b, table, strong, em, a, h1, h2, h3, pre, sub, sup, i, th, cp, ul, ol, li, dt, dd, input, span ").each(function(){																																			
			a = new Array($(this),$(this).css('font-size'));
			arr.push(a);
		});
		
		if ($.cookie('contrast')) applyContrast();
		if ($.cookie('textsizeConselho')) {
			var repeat = $.cookie('textsizeConselho').replace('-','');
			repeat = parseInt(repeat);
			for (i=0;i<arr.length;i++) {
				$(arr[i][0]).css('font-size',arr[i][1]);
			}
			inc = 0;
			if(parseInt($.cookie('textsizeConselho')) > 0){
				for (x=0;x<repeat;x++){
					aumentarFonte();
				}
			}else if(parseInt($.cookie('textsizeConselho')) < 0){
				for (x=0;x<repeat;x++){
					diminuirFonte();
				}
			}
			inc = $.cookie('textsizeConselho');
		}
	})
/////////////////////////////////////////////////////////////////////////


