Added option for insertion location

Available options are 'insertBefore', 'insertAfter', 'prependTo', and  'appendTo'