Always replace fragment content on deck selection.

We are creating a new StudyOptionsFragment instance and replacing
the content of the fragment on the right with it. There is no need to
check if the existing fragment is null or of the right type since we are
replacing it anyway. Also remove the check for different deck IDs since
it's possible to not have a StudyOptionsFragment loaded but still select
the same deck (e.g., when resuming activity).
Use correct connection type in shared deck download (http/https).

The download link may be either HTTP or HTTPS, and openConnection()
returns the respective connection type. We need to typecast to the
correct type or it will break.
Merge pull request #47 from hssm/shared-deck-import

Use correct connection type in shared deck download (http/https).
Vertical align without tables.
Merge remote-tracking branch 'ankidroid/v2.1-dev' into v2.1-dev-ospalh-special
Use inner div with margins and make margins smaller.
Merge remote-tracking branch 'ankidroid/v2.1-dev' into v2.1-dev-ospalh-special
Merge pull request #1 from hssm/v2.1-dev-html5-2

Vertical align without tables.
Semi-automatically remove trailingi whitespace.
Checkbox vertical centering (old style) or not (everything at top, like desktop).
Renamed values. Both are vertical alignment, only one is vertical centering.
Merge branch 'v2.1-dev-html5-2' into v2.1-dev-ospalh-special

Conflicts:
	assets/card_template.html
	assets/card_template_vertical_align.html
	assets/flashcard.css
	src/com/ichi2/anki/Reviewer.java
Do not add font files with the wrong extension.

Since the user can put any arbitrary files in the fonts directory on the
SD card, simply ignore anything that is not a .ttf or .ttc file.

If any extraneous files are added as fonts, a corresponding @font-face
directive will be added to the stylesheet, which will actually cause a
pop-up to show up during review.

This is a fix for:
https://code.google.com/p/ankidroid/issues/detail?id=1575
Merge pull request #49 from flerda/v2.1-ttf-ttc

Do not add font files with the wrong extension.
Third try to do html5.

Rename the card templates.
Don’t do horizontal align.
Let the webkit worry about resizing images.
Vertical centering without tables as an option. Thanks to @hssm
Use inner div with margins and make margins smaller.
Checkbox vertical centering (old style) or not (everything at top, like desktop).
Semi-automatically remove a few trailing spaces.
Fix Daniel Svärd’s name. Semi-automatically remove trailing whitespace.
Merge pull request #46 from hssm/loadfragment

Always replace fragment content on deck selection.
Allow .otf as a valid file extension, too.
Make it easier to add further valid font file formats by using an array.
Also add a function to get a file extension.
Merge branch 'v2.1-dev' into v2.1-dev-ospalh-special
Merge remote-tracking branch 'ankidroid/v2.1-dev' into v2.1-dev-ospalh-special
Merge branch 'v2.1-dev-html5-3' into v2.1-dev-ospalh-special

Conflicts:
	assets/card_template.html
	assets/flashcard.css
	src/com/ichi2/anki/Reviewer.java