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>'; }  });  });

var $b = jQuery.noConflict();
$b(document).ready(function(){	
  $b(".back-top").hide();  $b(function () {  $b(window).scroll(function () { if ($b(this).scrollTop() > 100) { $b('.back-top').fadeIn(); } else { $b('.back-top').fadeOut(); } });  $b('.back-top').click(function () { $b('body,html').animate({ scrollTop: 0 }, 800); return false; });  });	
  $b('[placeholder]').focus(function() { var input = $b(this); if (input.val() == input.attr('placeholder')) { input.val(''); input.removeClass('placeholder'); } }).blur(function() { var input = $b(this); if (input.val() == '' || input.val() == input.attr('placeholder')) { input.addClass('placeholder'); input.val(input.attr('placeholder')); } }).blur(); $b('[placeholder]').parents('form').submit(function() { $b(this).find('[placeholder]').each(function() { var input = $b(this); if (input.val() == input.attr('placeholder')) { input.val(''); } }) });		 
});

var $t = jQuery.noConflict();
$t('.tweetpopup').click(function(event) {
  var width  = 575,
	  height = 400,
	  left   = ($t(window).width()  - width)  / 2,
	  top    = ($t(window).height() - height) / 2,
	  url    = this.href,
	  opts   = 'status=1' +
			   ',width='  + width  +
			   ',height=' + height +
			   ',top='    + top    +
			   ',left='   + left;

  window.open(url, 'twitte', opts);

  return false;
});
