jQuery.fn.filterDisqus = function(find, options) {
	var settings = jQuery.extend({
		hiddenClass: 'hide'
	}, options); // Default values
	
	return this.each(function() {
		if ($(this).text().search(find) == -1) {
			$(this).parent().addClass(settings.hiddenClass);
		}
		else {
			$(this).parent().removeClass(settings.hiddenClass);
		}
		
	}); // Iteration
}; // Plugin

$(document).ready(function() {
	var loc = document.location.toString();
	tag = loc.match(/htag\/(.*)\/comments/);
	if (tag) {
		$('#dsq-popthreads .dsq-widget-thread').filterDisqus('#' + tag[1]);
	}
});