// Tira o bug de background em links no IE
window.onload = function(){
	try {
		document.execCommand("BackgroundImageCache", false, true);
	} catch(r) {}
}

// Redimensiona as legendas de acordo com suas respectivas fotos (obs.: tem que ser no window.load por causa de bug no Chrome) 
$(window).load(function(){
	$(".legenda").each(function(){
		$(this).css({"width": $(this).siblings("img").width() });
	});
});



// posiciona o elemento no centro da página - inicio
// adicionar class .jCentro
(function($){
   $.fn.extend({
	  jCentro: function () {
		return this.each(function() {
			var top = ($(window).height() - $(this).outerHeight()) / 2;
			var left = ($(window).width() - $(this).outerWidth()) / 2;
			$(this).css({position:'absolute', margin:0, top: (top > 0 ? top : 0)+'px', left: (left > 0 ? left : 0)+'px'});
		});
	}
  });
})(jQuery);
$(document).ready(function(){
	$(".jCentro").jCentro();
});
window.onresize = function(){
	$('.jCentro').jCentro();
};
// posiciona o elemento no centro da página - fim


$(function(){
});
