jQuery.fn.extend({
  opacity: function(opacity)
  {this.css
    ({
      'opacity': opacity, // web standards
      '-khtml-opacity': opacity, // konqueror
      '-moz-opacity': opacity, // mozilla < 2.0
      'filter': 'alpha(opacity ='+opacity*100+')' // IE
    })
  }
});

function ajustarLayout(){
  if( $(window).height() > $("#master").height() ){
    $("#body").css({'height':( $(window).height()-485)+ 'px'});
    $(".master").css({'height':( $(window).height() -480)+ 'px'});
  }
}
      
function bookmarksite(object){
  if(document.all){
    window.external.AddFavorite(object.href , object.title);
    return false;
  }
   return true;
}

function printIt(getSlug){
    var getTitle = $('#A h1').html();
    $.post("print.php",{
        title: getTitle,
        content: $('#A .txt').html(),
        siteName: 'JWorld - Animes, Mangás e Presentes',
        siteURL: 'http://www.jworld.com.br',
        slug: getSlug
    },function(html){
        $('body *').css('display','none');
        $('body').css('background','transparent none');
        $('body').append('<div id="print"><!-- --></div>');
        $('#print').css('display','block');
        $('#print').html(html);
    });
}

$(document).ready(function(){
    $("a[@rel=external]").attr('target','_blank');
    $('.completionLayout.body').opacity(0.60);
    $('.completionLayout.master').opacity(0.65);
    $('#Nemail, #s').focus(function(){ $(this).css('background-position','left -30px'); });
    $('#Nemail, #s').blur( function(){ if( $(this).val().length == 0 ) $(this).css('background-position','left top'); });
    $('#footer .a *').css('position','relative');
    $('#footer .a').ifixpng();
    $('div.box_galeria_de_fotos a:nth-child(3n+2)').addClass('last');
    $('div.box_galeria_de_fotos a.foto').attr('target','_blank');
});
$(window).load(function(){$('.completionLayout.master').css('height', ($('#body').height()+25)+'px' ); })  

$(window).resize(function(){ ajustarLayout(); });
