	/*Inicializa as dicas*/	



		$(document).ready(function(){

			$(function(){
			    $(".showtip[title]").tipTip({delay: 100});
			});

			$(function(){
			    $(".newstip[title]").tipTip({maxWidth: "auto",defaultPosition: "right",  delay: 100});
			});
		});



		$(document).ready(function(){

			$(".imagem_fancy").fancybox();

		});




	/*Inicializa os menus toggles*/		


		$(document).ready(function() {

			$('.toggle_site').dltoggle({ "open-image"   : "images/open.png",
		                     "closed-image" : "images/closed.png"});

			$(".toggle_siteopen").click(function(event){
				$('#dl3').dltoggle_show();
				return false;
			});

			$(".toggle_siteclose").click(function(event){
				$('#dl3').dltoggle_hide();
				return false;
			});

  		});







	/*Inicializa os efeitos fadein fadeout*/	

		$(document).ready(function(){

			$(".fadeop").fadeTo("slow", 0.3);

			$(".fadeop").hover(function(){
			$(this).fadeTo("slow", 1.0);
				},function(){
			$(this).fadeTo("slow", 0.3);
			});
		});






	/*Inicializa os efeitos os eventos*/	


		$(document).ready(function(){
		
			$(".content").hide();
			$(this).find(".content:first").show();

			document.getElementById("mycountlabel").innerHTML = "1 de "+$(".content").length;
	
			$(".prevnewsb").click(function () {

				totalcontents = $(".content").length;		
				lnum = parseInt(document.getElementById("mynumberlabel").innerHTML)-1;

				if(lnum < 0)
			  	  return;

 		        	$(".content").hide();
				document.getElementById("mynumberlabel").innerHTML = lnum;
				document.getElementById("mycountlabel").innerHTML = (lnum+1)+" de "+totalcontents;

				contentSlides = $(".content");
		
				contentSlides.each(function(i){{
					if(i == lnum)
					{
			     			$(this).fadeTo(200,0).show().fadeTo(500,1);
			     			//$(this).show();
						//$(this).slideUp();
						//$(this).slideDown();
					}
				}});
		  
			});
	

			$(".nextnewsb").click(function () {

				totalcontents = $(".content").length;
				lnum = parseInt(document.getElementById("mynumberlabel").innerHTML)+1;

				if(lnum >= totalcontents)
			  	  return;


				document.getElementById("mynumberlabel").innerHTML = lnum;
				document.getElementById("mycountlabel").innerHTML = (lnum+1)+" de "+totalcontents;

				$(".content").hide();
				contentSlides = $(".content");

				contentSlides.each(function(i){{
					if(i == lnum)
					{
			     			$(this).fadeTo(200,0).show().fadeTo(500,1);
						//$(this).slideUp();
						//$(this).slideDown();
					}
				}});
			
			});
	
	
	  	});






		$(window).load(function() {
			$("#slider").nivoSlider({
				effect:"fold",
				slices:15,
				animSpeed:500,
				pauseTime:4000,
				startSlide:0,
				directionNav:true,
				directionNavHide:false,
				controlNav:false,
				controlNavThumbs:false,
				controlNavThumbsFromRel:false,
				beforeChange: function(){},
				afterChange: function(){},
				slideshowEnd: function(){}
			});
		});


$(document).ready(function(){
  
$(".resetFont").click(function(){
               setFontSize(originalFontSize);
               $("#changeFont").fadeToggle("fast");
               return false;
       });
 
       $(".increaseFont").click(function(){
               var fontSize = getFontSize();
               var newFontSize = fontSize + 1;
               setFontSize(newFontSize);
               return false;
       });
 
       $(".decreaseFont").click(function(){
               var fontSize = getFontSize();
               var newFontSize = fontSize - 1;
               setFontSize(newFontSize);
               return false;
       });
 
function getFontSize() {
       var currentSize = $("body").css("font-size");
       var currentSizeNumber = parseFloat(currentSize, 12);
       if(currentSizeNumber > 16) {
               currentSizeNumber = 16;
       }
       return currentSizeNumber;
}
 
function setFontSize(size) {
       $("body").css("font-size", size);
       $(".actualSize").html(size);
}
 
var originalFontSize = getFontSize();
$(".originalSize").html(originalFontSize);
$(".actualSize").html(originalFontSize);

});
