$(document).ready(function(){
  $("ul").each(function(){
    $(this).children("li:first").addClass("first");
    $(this).children("li:last").addClass("last");
  });
  $('a[rel*=external]').click(function(){
		window.open(this.href);
		return false;
	});



Cufon.replace('#content h2', {
    color: '-linear-gradient(#050505, #818181)',
    fontFamily: 'AgBlack'
});

Cufon.replace('#footer_nav a.section', {
  fontFamily: 'AgBlack'
});

Cufon.replace('#sidebar a', {
  fontFamily: 'AgMedium',
  hover: true
});

    Cufon.now();

});

//$(window).load(function(){
window.onload = function(){
  $(".img_container").each(function(){
    $(this).append("<span>&nbsp;</span>");
    var spanh = $(this).height() - 14;
    var spanw = $(this).width() - 14;
    //hardcode
    /*if(spanh == -14){
       spanh = 231;
    }
    if(spanw == -14){
       spanw = 418;
    }*/
    $(this).children("span").css({
      "height" : spanh,
      "width" : spanw,
      "opacity" : 0.5
    });
  });
};
   
//});
