$(document).ready(function() {
  var reso = screen.width - 70;
  if(screen.width<=800) {
    $('#header-inner').css('width',reso);
  } else {
    if(screen.width<=1024) {
      $('#header-inner').css('width',reso);
    } else {
      if (screen.width<=1280) {
        $('#header-inner').css('width',reso);
      } else {
        $('#header-inner').css('width',reso);
      }
    }
  }

  $('#header-inner').css('backgroundPosition','center top');

  $('a:contains("2004")').parent('li').hide();

//  $('.post-comment-link').css('float', 'right');

  $('#wrap2').corner('bottom 20px');
  $('#busca-omdg').corner();
  $('.code').corner();
  $('.post-footer-line-1').corner('top');
  $('.post-footer-line-2').corner('bottom');

  // função click para o campo do formulário de busca
  $('#search-box').click(function() {
    if (this.value == 'Pesquisar aqui') { $(this).val(''); }
  });
  // função blur para o campo do formulário de busca
  $('#search-box').blur(function() {
    if ($(this).val() == '') { this.value = 'Pesquisar aqui'; }
  });

//  $('#comments h4').('font-family','Arial');
//  $('#comments h4').('text-align','center');
//  $('a').tooltip();

 $('#topo').click(function(){
   $('html, body').animate({ scrollTop: 0 }, 'slow');
 });

 $('#topo').hide();

 if ($(window).scrollTop()!='0'){
   $('#topo').fadeIn('slow');
 }

 $(window).scroll(function(){
   if ($(window).scrollTop()=='0'){
     $('#topo').fadeOut('slow');
   } else {
     $('#topo').fadeIn('slow');
   }
 });

});
