app-quickstart and app-b2b indexOf -> inArray fixes

IE8 does not support the indexOf method for Arrays, only for Strings, so
we must use the browser-neutralized $.inArray(val, arr) method from
jQuery.  Its return type is the same as indexOf, so the same
conditional's apply.