Based on source code contributed to the original JempBox project. Copyright (c) 2006-2007, www.jempbox.org