function inArray( elem, array ) {
    if ( array.indexOf ) {
        return array.indexOf( elem );
    }