jQuery(document).ready(function($){
	//jQuery("#sb-blogblogs").html('<script type="text/javascript" src="http://embed.blogblogs.com.br/embed/readers?blog_id=201091&layout=GS&style=0&rank=0&n=32&img=b"></script>');
	jQuery(".bbw_footer").append(" <span class='bbw_jquery' onclick='changeBlogBlogs();'>expandir</span>");
	jQuery("#bbw_readers > a").wrapAll("<div class='bbw_users'></div>");
	//jQuery('<a href="'+jQuery(".bbw_subtitle a").attr("href")+'" title="Ver todos os leitores"><img src="http://arthurvinicius.com/blog/wp-content/themes/pixeled/images/blogblogs/maximize.png"/></a>').css("padding","5px").appendTo(".bbw_icons");
	jQuery(".bbw_control a").html('<img src="http://arthurvinicius.com/blog/wp-content/themes/pixeled/images/blogblogs/login.png" />');
	jQuery(".bbw_control a").appendTo(".bbw_icons");
	jQuery(".bbw_icons > a").wrapAll("<ul class='bbw_icons-sort'></ul>");
	jQuery(".bbw_icons > a").wrap("<li></li>");
	
	jQuery(".bbw_icons img:eq(0)").attr("src","http://arthurvinicius.com/blog/wp-content/themes/pixeled/images/blogblogs/user.png").css("padding","5px");
	jQuery(".bbw_icons img:eq(1)").attr("src","http://arthurvinicius.com/blog/wp-content/themes/pixeled/images/blogblogs/application.png").css("padding","5px");
	jQuery(".bbw_icons img:eq(2)").attr("src","http://arthurvinicius.com/blog/wp-content/themes/pixeled/images/blogblogs/star.png").css("padding","5px");
	jQuery(".bbw_icons img:eq(3)").attr("src","http://arthurvinicius.com/blog/wp-content/themes/pixeled/images/blogblogs/group.png").css("padding","5px");
	jQuery(".bbw_icons img:eq(4)").attr("src","http://arthurvinicius.com/blog/wp-content/themes/pixeled/images/blogblogs/rss.png").css("padding","5px");
	jQuery(".bbw_icons img:eq(5)").css("padding","5px");
	jQuery(".bbw_icons img:eq(6)").css("padding","5px");
	
	jQuery(".bbw_icons img").fadeTo("fast",0.45).hover(function(){$(this).attr("src",$(this).attr("src").replace(".png","_c.png")).fadeTo("slow",1);},function(){$(this).attr("src",$(this).attr("src").replace("_c.png",".png")).fadeTo("slow",0.45);});
	
	jQuery("#sidebar_full_sort").sortable({placeholder : "class_prov",opacity : 0.7,revert : true,cursor : "move"});
	jQuery(".bbw_icons-sort").sortable({placeholder : "class_prov",opacity : 0.7,revert : true,cursor : "move"});
	jQuery(".sortable").sortable({cursor: "move",placeholder : "class_prov"});
	jQuery("#nav li a").tooltip({delay: 0,fade: 250});
	jQuery(".bbw_icons a").tooltip({delay: 0,fade: 250});
	jQuery(".bbw_users a:not(:first,:last)").fadeTo("fast",0.45).hover(function(){$(this).fadeTo("slow",1);},function(){$(this).fadeTo("slow",0.45);});
	
	jQuery(".bbw_users a:last").remove();
	jQuery(".bbw_users").append('<a href="'+jQuery(".bbw_subtitle a").attr("href")+'" title="Ver todos os leitores" target="_blank"><img src="http://arthurvinicius.com/blog/wp-content/themes/pixeled/images/blogblogs/expand_user.png" class="bbw_avatar" width="25" /></a>');
	//jQuery(".bbw_users a:last img").attr("alt","Ver todos os leitores");
	//jQuery(".bbw_users a:last").attr("href",jQuery(".bbw_subtitle a").attr("href"));

	jQuery(".bbw_users a").tooltip({ track: true, delay: 0, showURL: false,opacity: 1, fixPNG: true,extraClass: "pretty fancy",fade: 250,top: 0, left: 10});
	
	jQuery("#bbw_readers").fadeIn(3000);
	jQuery("#loading").remove();
});

var changeBlogBlogs = function(){
	if(jQuery(".bbw_users").height() == "35")
	{jQuery(".bbw_users").animate({ height : "140px"},1500);jQuery(".bbw_jquery").html('reduzir');jQuery(".bbw_users > a").fadeTo("fast",1);}
	else
	{jQuery(".bbw_users").animate({ height : "35px"},1500);jQuery(".bbw_jquery").html('expandir');jQuery(".bbw_users > a:not(:first)").fadeTo("fast",0.45);}
}