/* SVN FILE: $Id: code.js 1949 2009-12-01 00:02:43Z ad7six $ */

/*!
 * code.js -  scripts for pages that display code
 *
 * @package       base
 * @copyright     Copyright (c) 2008, Andy Dawson
 * @link          www.ad7six.com
 * @license       http://www.opensource.org/licenses/mit-license.php The MIT License
 */

$(function() {
	/* Toggle Code */
	$('pre.code').before('<a class="codeToggle" href="#">' + __('Plain Text View') + '</a>');
	$('a.codeToggle').click().toggle(function() {
			$(this).next().show();
			$(this).next().next().hide();
			$(this).text(__('Code View'));
			return false;
		}, function() {
			$(this).next().hide();
			$(this).next().next().show();
			$(this).text(__('Plain Text View'));
			return false;
	});
});