Added functions from HotNews Pro theme to enable thumbnail. Modified the
thumbnail code to smartly resize thumbnail.