var $a = jQuery.noConflict();

$a(function(){ var thumbnails = 'a:has(img)[href$=".bmp"],a:has(img)[href$=".gif"],a:has(img)[href$=".jpg"],a:has(img)[href$=".jpeg"],a:has(img)[href$=".png"],a:has(img)[href$=".BMP"],a:has(img)[href$=".GIF"],a:has(img)[href$=".JPG"],a:has(img)[href$=".JPEG"],a:has(img)[href$=".PNG"]'; var posts = $a('.post'); posts.each(function() { $a(this).find(thumbnails).addClass("fancybox").attr('rel','fancybox'+posts.index(this)) }); $a("a.fancybox").fancybox({  'transitionIn' : 'none', 'transitionOut' : 'none', 'titlePosition' : 'inside', 'titleFormat' : function(title, currentArray, currentIndex, currentOpts) { return '<span style="display:none;">Imagem ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp;-&nbsp; ' + title : '') + '</span>'; }  });  });
