$.extend($.fn.rating = function() {
	var clicado = false;
	$(this).children("a").click(function() {
		clicado = true; 
		$(this).prevAll().andSelf().css("backgroundPosition", "0 -16px");
	});
	$(this).children("a").mouseover(function(){
		if(!clicado) {
			$(this).prevAll().andSelf().css("backgroundPosition", "0 -32px");
			$(this).nextAll().css("backgroundPosition", "0 0");
		}
	});
	$(this).mouseout(function(){
		if(!clicado) {
			$(this).parent().find("a").css("backgroundPosition", "0 0");
		}
	});
  $('a[rel=lightbox]').lightBox();

});