// Tira o bug de background em links no IE
function ieFlickerFix(){try{document.execCommand("BackgroundImageCache",!1,!0)}catch(a){}}window.onload=ieFlickerFix;

(function($){
	$.fn.exists = function(){
		return !!this.length;
	};
	
	// Suporte a opacidade (falso no IE)
	var op = $.support.opacity;

	$(function(){
		// Redimensiona as legendas de acordo com suas respectivas fotos
		$('.legenda').each(function(){
			var $l = $(this),
				$img = $l.siblings('img').exists() ? $l.siblings('img') : $l.siblings().find('img');
			$img.imagesLoaded(function(){
				$l.width($img.width());
			});
		});
	});
}(jQuery));
