if(jQuery) {

	// Execute after page load
	$(function() {
		// Append "plain-text" option link
		$('div.dean_ch').append('<div style="margin-top: 10px; color: #000; font-size: 80%" class="dch_unformat"><label style="cursor:pointer" title="convert the above code to copy-friendly text">plain-text</label></div>');
		$('.dch_unformat label').click(function() {
			var ob = $(this).parent().parent();
			ob.after('<pre class="dch_plain-text" style="display:none"></pre>').hide();
			
			ob.next().text(ob.find('li').text().replace(/\n([^\n])/g, '$1') )
				.append('<div style="margin-top:10px; color:#8888BB; font-size:80%;" class="dch_formatted"><label style="cursor:pointer" title="syntax-highlight the above code">highlight syntax</label></div>')
				.fadeIn().find('.dch_formatted label').click(function() {
				$(this).parent().parent().remove();
				ob.fadeIn();
			});
		});
		
		// Add extra class to disqus trackback zone 
		/*
		var dsqinterval = setTimeout(function () {
			$('.dsq-trackback-url').next().addClass('dsq-trackback');
			if ($('.dsq-trackback').length > 0) {
				clearInterval(dsqinterval);
			}
		}, 1000);*/
	});
	
}
