jQuery(document).ready(function(){

	initPre();

});

function initPre(){
	jQuery('.showpre').click(function(){
		jQuery(this).parent().next().show();
		jQuery(this).hide();
	});
	
	// Fix the pre to show html
	/*
	jQuery('pre').each(function(){

		thisItem = jQuery(this);
		
		if(!thisItem.parent().is('.code')){
			
			thisItem.after('<textarea>'+thisItem.html()+'</textarea>');
			
			codeString = thisItem.html().replace(
				new RegExp( "(<|>)", "gi" ),
				function( $0, $1 ){
					if ( $1 == ">" ){
						return( "&gt;" );
					} else {
						return( "&lt;" );
					}
				}
			);
		
			thisItem.html(codeString);
			
		}
		
	});
	*/
}
