// Lets keep this function as it is called inline from multiple right column containers.
function print_preview() {
	
	// Turn all stylesheets except print style off and duplicate for screen.
        // This way we can provide styles for screen and printers using the one stylesheet.
	$("link[rel*='stylesheet']").each(function(i){
	    var $self = $(this);
	    var myHref = $self.attr('href');
	    if(myHref.match('print.css')){
	        var $printForScreen = $self.clone();
	        $printForScreen.attr('media','screen');
	        $self.after($printForScreen);
	    } else {
	        this.disabled = true;
	        $self.remove();
	    }
	}); // End each.
	
	// Preview mode message and cancel link, add to top and bottom of document.
	var previewMessage = '<p>You are in print preview mode. <a href="#" class="cancelPrintPreview">Cancel print preview mode.</a></p>';
	$('body').prepend(previewMessage).append(previewMessage);
	
	// Bind cancel link event to reload page.
	$('.cancelPrintPreview').click( function(e) {
	    location.reload();
	}); // End click.
	
	
	// Prompt to print.
	window.print();
	
} // End print_preview().

