Fix for index.nodeType check in insertSlideAfter method

The insertSlideAfter method checks for the nodeType property on the index parameter where index is (from what I understand) always a number. So it doesn't have that property. It looks like it makes more sense to check nodeType on html to see if it's an actual doc fragment or a string.

My appologies for all of the end of line white space removal. Sublime Text does that automatically for me. The only real code changes are on lines 292 and 293. If the white space removal is a problem for this pull request I can make my changes in Notepad++ or something similar.