Trying to figure out the content type for the currently selected item is the problem.  Any help or suggestions is appriciated.
moved all the show/hidding of row elements to one function.  Still trying to figure out how excecute the proper code inside of the new function, according to the preferences that have been passed in.