Rearrange dogear behaviour

Each .tweet-dogear section had a few common lines. These lines are now in their own indented section, resulting in a reduced number of lines of code to achieve the same result.