
function abrir(){	
	document.getElementById('abrir').style.display = 'block';
	document.getElementById('div1').style.display = 'block'
};

function shareOpen(){
	$("ul#shareBox").fadeIn('slow');
	document.getElementById(this).style.display = 'block'
};

$(document).ready(function(){

	
	$("#slider").easySlider({
		auto: true, 
		continuous: true
	});


	$(".toolTip").easyTooltip({
		tooltipId: "easyTooltip"
	});
	
	$(".toolTipAc").easyTooltip({
		tooltipId: "easyTooltip2"
	});
	
	$(".toolTip3").easyTooltip({
		tooltipId: "easyTooltip3"
	});
	
       
    $(".toolTipRSS").easyTooltip({
		tooltipId: "easyTooltipRSS"
	});
    

    $("#twitter_div").getTwitter({
    	    userName: "maximidiamm",
    	    numTweets: 1,
    	    loaderText: "<span>carregando tweets...</span>",
    	    slideIn: true,
    	    showHeading: true,
    	    headingText: "",
    	    showProfileLink: false
    });


    var fonte = 13;
    var lineHeight = 18;
    
      $("#aumenta_fonte").click(function(){
  		if (fonte<17){
  			fonte = fonte+1;
  			lineHeight = lineHeight+1;
  			$("#aumentaBaixa").css({'font-size' : fonte+'px','line-height' : lineHeight+'px'});
  			$("#textoT").css({'font-size' : fonte+'px','line-height' : lineHeight+'px'});
  			$("#textoT p").css({'font-size' : fonte+'px','line-height' : lineHeight+'px'});
  			
  		}
      });
      
      $("#reduz_fonte").click(function(){
  		if (fonte>9){
  			fonte = fonte-1;
  			lineHeight = lineHeight-1;
  			$("#aumentaBaixa").css({'font-size' : fonte+'px','line-height' : lineHeight+'px'});
  			$("#textoT").css({'font-size' : fonte+'px','line-height' : lineHeight+'px'});
  			$("#textoT p").css({'font-size' : fonte+'px','line-height' : lineHeight+'px'});
  		}
      });

      $("#MsgCount").text("0").css({'font-weight' : 'bold'});

      $("#comentario").keyup(function (event) {
  
    	  $Comentario = $(this).val();

    	  var maxText = 300;

    	  var numChar = $Comentario.length;

    	  $("#MsgCount").text(numChar);

    	  if (numChar < maxText){
    		  
    		  $("#MsgCount");
    	  }
    	  else
    	  {
    		  if ( numChar > maxText)
    		  {
    			  if (event.keyCode != 8)
    			  {
  
    				  $("#MsgCount").text("Excedeu "+numChar).css({'font-weight' : 'bold', 'color' : '#ae1b50'});
    			  }
    		  }
    	  }
      });
      
      
      
      
      
	  	$(function() {
			$('ul.hover_block li').hover(function(){
				$(this).find('img').animate({left:'-140px'},{queue:false,duration:500});
			}, function(){
				$(this).find('img').animate({left:'0px'},{queue:false,duration:500});
			});
			
		});

      
      

});